From 29b4739134c73a2873adec93346f09bb76d6a794 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Thu, 24 Jul 2014 12:52:23 -0700 Subject: 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 Reviewed-by: Jason Gerecke Tested-by: Jason Gerecke Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/wacom_wac.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/input/tablet/wacom_wac.h') diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index f48164c780f4..8821a518abf6 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h @@ -137,6 +137,8 @@ struct wacom_features { unsigned touch_max; int oVid; int oPid; + bool check_for_hid_type; + int hid_type; }; struct wacom_shared { @@ -151,7 +153,7 @@ struct wacom_shared { struct wacom_wac { char name[WACOM_NAME_MAX]; char pad_name[WACOM_NAME_MAX]; - unsigned char *data; + unsigned char data[WACOM_PKGLEN_MAX]; int tool[2]; int id[2]; __u32 serial[2]; -- cgit v1.2.3