mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Input: wacom - switch from an USB driver to a HID driver
All USB Wacom tablets are actually HID devices. For historical reasons, they are handled as plain USB devices. The current code makes more and more reference to the HID subsystem like implementing its own HID report descriptor parser to handle new devices. From the user point of view, we can transparently switch from this state to a driver handled in the HID subsystem and clean up a lot of USB specific code in the wacom.ko driver. The other benefit once the USB dependecies have been removed is that we can use a tool like uhid to make regression tests and allow further cleanup or new implementations without risking breaking current behaviors. To match the current handling of devices in wacom_wac.c, we rely on the hid_type set by usbhid. usbhid sets the hid_type to HID_TYPE_USBMOUSE when it sees a USB boot mouse protocol declared and HID_TYPE_USBNONE when the device is plain HID. There is thus a one to one matching between the list of supported devices before and after the switch from USB to HID. Signed-off-by: Benjamin Tissoires <[email protected]> Reviewed-by: Jason Gerecke <[email protected]> Tested-by: Jason Gerecke <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
This commit is contained in:
parent
f54bc61cf7
commit
29b4739134
7 changed files with 141 additions and 188 deletions
|
|
@ -787,6 +787,15 @@ static int hid_scan_report(struct hid_device *hid)
|
|||
/* hid-rmi should take care of them, not hid-generic */
|
||||
hid->group = HID_GROUP_RMI;
|
||||
|
||||
/*
|
||||
* Vendor specific handlings
|
||||
*/
|
||||
switch (hid->vendor) {
|
||||
case USB_VENDOR_ID_WACOM:
|
||||
hid->group = HID_GROUP_WACOM;
|
||||
break;
|
||||
}
|
||||
|
||||
vfree(parser);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2339,7 +2348,6 @@ static const struct hid_device_id hid_ignore_list[] = {
|
|||
{ HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LCSPEC) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WACOM, HID_ANY_ID) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT) },
|
||||
|
|
|
|||
|
|
@ -960,7 +960,7 @@ static const struct hid_device_id wacom_devices[] = {
|
|||
MODULE_DEVICE_TABLE(hid, wacom_devices);
|
||||
|
||||
static struct hid_driver wacom_driver = {
|
||||
.name = "wacom",
|
||||
.name = "hid-wacom",
|
||||
.id_table = wacom_devices,
|
||||
.probe = wacom_probe,
|
||||
.remove = wacom_remove,
|
||||
|
|
|
|||
Loading…
Reference in a new issue