diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2014-07-24 21:52:23 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-07-26 03:53:50 +0200 |
commit | 29b4739134c73a2873adec93346f09bb76d6a794 (patch) | |
tree | fbb2527a5c99a8a613adc043dbc05417139f5050 /drivers/input/tablet/wacom.h | |
parent | Input: wacom - include and use linux/hid.h (diff) | |
download | linux-29b4739134c73a2873adec93346f09bb76d6a794.tar.xz linux-29b4739134c73a2873adec93346f09bb76d6a794.zip |
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 <benjamin.tissoires@redhat.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/tablet/wacom.h')
-rw-r--r-- | drivers/input/tablet/wacom.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h index caa59cab2c5f..b9212390db71 100644 --- a/drivers/input/tablet/wacom.h +++ b/drivers/input/tablet/wacom.h @@ -106,14 +106,12 @@ MODULE_LICENSE(DRIVER_LICENSE); #define USB_VENDOR_ID_LENOVO 0x17ef struct wacom { - dma_addr_t data_dma; struct usb_device *usbdev; struct usb_interface *intf; - struct urb *irq; struct wacom_wac wacom_wac; + struct hid_device *hdev; struct mutex lock; struct work_struct work; - bool open; char phys[32]; struct wacom_led { u8 select[2]; /* status led selector (0..3) */ @@ -130,7 +128,7 @@ static inline void wacom_schedule_work(struct wacom_wac *wacom_wac) schedule_work(&wacom->work); } -extern const struct usb_device_id wacom_ids[]; +extern const struct hid_device_id wacom_ids[]; void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len); void wacom_setup_device_quirks(struct wacom_features *features); |