summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@enac.fr>2010-12-14 11:38:18 +0100
committerJiri Kosina <jkosina@suse.cz>2010-12-14 11:40:50 +0100
commitad6d42670279da8f33f633f8a96a67cd7ef3b1da (patch)
tree081e430f4db77e93c921186fc0c55118fc0f8f83 /drivers/hid
parentHID: magicmouse: Don't report REL_{X,Y} for Magic Trackpad (diff)
downloadlinux-ad6d42670279da8f33f633f8a96a67cd7ef3b1da.tar.xz
linux-ad6d42670279da8f33f633f8a96a67cd7ef3b1da.zip
HID: hid-mosart: ignore buttons report
This commit allows the device to be recognized as a touchscreen, and not a touchpad by xf86-input-evdev. The device has 2 modes. The first one is an emulation of a touchscreen by sending left and right button, and the second mode is the one used in dual-touch (sending trackingID, touch and else). That's why there is a hid report containing left and right buttons (9000001 and 9000002). The point is that xorg relies on these fields to determine if it's a touchpad or a touchscreen. Clearing the report (return -1) makes xorg detecting it out of the box as a quite pleasant (dual)touchscreen. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> 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-mosart.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/hid-mosart.c b/drivers/hid/hid-mosart.c
index ac5421d568f1..acd8a4983c09 100644
--- a/drivers/hid/hid-mosart.c
+++ b/drivers/hid/hid-mosart.c
@@ -90,6 +90,10 @@ static int mosart_input_mapping(struct hid_device *hdev, struct hid_input *hi,
case 0xff000000:
/* ignore HID features */
return -1;
+
+ case HID_UP_BUTTON:
+ /* ignore buttons */
+ return -1;
}
return 0;