mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
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>
This commit is contained in:
parent
a062cc5a76
commit
b77c3920e9
3 changed files with 18 additions and 0 deletions
|
@ -474,6 +474,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
|
|||
map_key_clear(BTN_STYLUS2);
|
||||
break;
|
||||
|
||||
case 0x51: /* ContactID */
|
||||
device->quirks |= HID_QUIRK_MULTITOUCH;
|
||||
goto unknown;
|
||||
|
||||
default: goto unknown;
|
||||
}
|
||||
break;
|
||||
|
@ -978,6 +982,13 @@ int hidinput_connect(struct hid_device *hid, unsigned int force)
|
|||
}
|
||||
}
|
||||
|
||||
if (hid->quirks & HID_QUIRK_MULTITOUCH) {
|
||||
/* generic hid does not know how to handle multitouch devices */
|
||||
if (hidinput)
|
||||
goto out_cleanup;
|
||||
goto out_unwind;
|
||||
}
|
||||
|
||||
if (hidinput && input_register_device(hidinput->input))
|
||||
goto out_cleanup;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue