From patchwork Wed Mar 9 17:38:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 621911 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p29HbFs7019737 for ; Wed, 9 Mar 2011 17:37:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308Ab1CIRhO (ORCPT ); Wed, 9 Mar 2011 12:37:14 -0500 Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:49284 "EHLO ch-smtp01.sth.basefarm.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757106Ab1CIRhO (ORCPT ); Wed, 9 Mar 2011 12:37:14 -0500 Received: from c83-254-52-20.bredband.comhem.se ([83.254.52.20]:49028 helo=polaris) by ch-smtp01.sth.basefarm.net with smtp (Exim 4.73) (envelope-from ) id 1PxNJh-0003Kx-6H; Wed, 09 Mar 2011 18:37:01 +0100 Received: by polaris (sSMTP sendmail emulation); Wed, 09 Mar 2011 18:39:01 +0100 From: "Henrik Rydberg" To: Jiri Kosina Cc: Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Henrik Rydberg , stable@kernel.org, Michael Poole , Chase Douglas Subject: [PATCH] HID: hid-magicmouse: Correct touch orientation direction Date: Wed, 9 Mar 2011 18:38:57 +0100 Message-Id: <1299692337-1547-1-git-send-email-rydberg@euromail.se> X-Mailer: git-send-email 1.7.4.1 X-Originating-IP: 83.254.52.20 X-Scan-Result: No virus found in message 1PxNJh-0003Kx-6H. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1PxNJh-0003Kx-6H 49ced1d223f8efea2d34f8ee10f22fd7 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 09 Mar 2011 17:37:15 +0000 (UTC) diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 698e645..318cc40 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c @@ -258,7 +258,7 @@ static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, u8 *tda input_report_abs(input, ABS_MT_TRACKING_ID, id); input_report_abs(input, ABS_MT_TOUCH_MAJOR, touch_major << 2); input_report_abs(input, ABS_MT_TOUCH_MINOR, touch_minor << 2); - input_report_abs(input, ABS_MT_ORIENTATION, orientation); + input_report_abs(input, ABS_MT_ORIENTATION, -orientation); input_report_abs(input, ABS_MT_POSITION_X, x); input_report_abs(input, ABS_MT_POSITION_Y, y); @@ -397,7 +397,7 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0); input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0); input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0); - input_set_abs_params(input, ABS_MT_ORIENTATION, -32, 31, 1, 0); + input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0); /* Note: Touch Y position from the device is inverted relative * to how pointer motion is reported (and relative to how USB