diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2011-03-09 12:38:57 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-03-09 18:05:59 -0500 |
commit | 2d9ca4e9f393d81d8f37ed37505aecbf3a5e1bd6 (patch) | |
tree | d0846e0763df2d519f8ea9bc79588c9410972415 /drivers/hid | |
parent | d9236303d0b7ba8bbaeb6adbbf088c3fe2a9ab9e (diff) |
HID: hid-magicmouse: Correct touch orientation direction
The magic trackpad and mouse both report touch orientation in opposite
direction to the bcm5974 driver and what is written in
Documents/input/multi-touch-protocol.txt. This patch reverts the
direction, so that all in-kernel devices with this feature behave the
same way.
Since no known application has been utilizing this information yet, it
seems appropriate also for stable.
Cc: stable@kernel.org
Cc: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-magicmouse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 698e6459fd0b..318cc40df92d 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 | |||
258 | input_report_abs(input, ABS_MT_TRACKING_ID, id); | 258 | input_report_abs(input, ABS_MT_TRACKING_ID, id); |
259 | input_report_abs(input, ABS_MT_TOUCH_MAJOR, touch_major << 2); | 259 | input_report_abs(input, ABS_MT_TOUCH_MAJOR, touch_major << 2); |
260 | input_report_abs(input, ABS_MT_TOUCH_MINOR, touch_minor << 2); | 260 | input_report_abs(input, ABS_MT_TOUCH_MINOR, touch_minor << 2); |
261 | input_report_abs(input, ABS_MT_ORIENTATION, orientation); | 261 | input_report_abs(input, ABS_MT_ORIENTATION, -orientation); |
262 | input_report_abs(input, ABS_MT_POSITION_X, x); | 262 | input_report_abs(input, ABS_MT_POSITION_X, x); |
263 | input_report_abs(input, ABS_MT_POSITION_Y, y); | 263 | input_report_abs(input, ABS_MT_POSITION_Y, y); |
264 | 264 | ||
@@ -397,7 +397,7 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h | |||
397 | input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0); | 397 | input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0); |
398 | input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0); | 398 | input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0); |
399 | input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0); | 399 | input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0); |
400 | input_set_abs_params(input, ABS_MT_ORIENTATION, -32, 31, 1, 0); | 400 | input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0); |
401 | 401 | ||
402 | /* Note: Touch Y position from the device is inverted relative | 402 | /* Note: Touch Y position from the device is inverted relative |
403 | * to how pointer motion is reported (and relative to how USB | 403 | * to how pointer motion is reported (and relative to how USB |