diff options
author | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2011-09-21 14:56:54 (GMT) |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-26 12:18:18 (GMT) |
commit | b77c3920e90e96103e4f41442999402925fe5f73 (patch) | |
tree | 04df6c729a1e9b3afaa8e8f06b51fede1ef57779 /drivers/hid/hid-core.c | |
parent | a062cc5a76fa1d12f0821e56e3746cad2dc2fc65 (diff) | |
download | linux-b77c3920e90e96103e4f41442999402925fe5f73.tar.xz |
HID: add autodetection of multitouch devices
As mentioned by http://www.microsoft.com/whdc/device/input/DigitizerDrvs_touch.mspx
multitouch devices are those that have the input report HID_CONTACTID.
This patch detects this and unloads the generic-usb driver.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 956f849..f869ab3 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1212,6 +1212,12 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask) if ((connect_mask & HID_CONNECT_HIDINPUT) && !hidinput_connect(hdev, connect_mask & HID_CONNECT_HIDINPUT_FORCE)) hdev->claimed |= HID_CLAIMED_INPUT; + if (hdev->quirks & HID_QUIRK_MULTITOUCH) { + /* this device should be handled by hid-multitouch, skip it */ + hdev->quirks &= ~HID_QUIRK_MULTITOUCH; + return -ENODEV; + } + if ((connect_mask & HID_CONNECT_HIDDEV) && hdev->hiddev_connect && !hdev->hiddev_connect(hdev, connect_mask & HID_CONNECT_HIDDEV_FORCE)) |