aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2010-12-08 18:08:04 -0500
committerJiri Kosina <jkosina@suse.cz>2010-12-09 08:39:53 -0500
commit6a66bbd693c12f71697c61207aa18bc5a12da0ab (patch)
treea9e152c980282e69667221a5328083827aac33bb /drivers/hid
parent59e57c622c3502346e8f930421ebc482d639520c (diff)
HID: magicmouse: Don't report REL_{X,Y} for Magic Trackpad
With the recent switch to having the hid layer handle standard axis initialization, the Magic Trackpad now reports relative axes. This would be fine in the normal mode, but the driver puts the device in multitouch mode where no relative events are generated. Also, userspace software depends on accurate axis information for device type detection. Thus, ignoring the relative axes from the Magic Trackpad is best. Signed-off-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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index e6dc15171664..ed732b746c96 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -433,6 +433,11 @@ static int magicmouse_input_mapping(struct hid_device *hdev,
433 if (!msc->input) 433 if (!msc->input)
434 msc->input = hi->input; 434 msc->input = hi->input;
435 435
436 /* Magic Trackpad does not give relative data after switching to MT */
437 if (hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD &&
438 field->flags & HID_MAIN_ITEM_RELATIVE)
439 return -1;
440
436 return 0; 441 return 0;
437} 442}
438 443