diff options
author | Daniel Ritz <daniel.ritz@gmx.ch> | 2008-07-03 10:45:37 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-07-03 11:36:29 -0400 |
commit | ec42d4481e36cbdb5b2801f957e678211a9e5ae2 (patch) | |
tree | 049a46cce1b516bbd24eed8ac8dbe0ceb41fd0ac /drivers/input/touchscreen/usbtouchscreen.c | |
parent | 89cdb8cebe6ab6590f8083877c4ca5e92303b3b0 (diff) |
Input: usbtouchscreen - ignore eGalax screens supporting HID protocol
The newer versions of the eGalax/EETI screen implement the HID protocol.
The device IDs are still the same, but the USB interface descriptor shows
the device being of HID class. Change usbtouchscreen to ignore the HID
models as they are handled properly by usbhid.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen/usbtouchscreen.c')
-rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 792b2708a137..fdd645c214a2 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/init.h> | 49 | #include <linux/init.h> |
50 | #include <linux/usb.h> | 50 | #include <linux/usb.h> |
51 | #include <linux/usb/input.h> | 51 | #include <linux/usb/input.h> |
52 | #include <linux/hid.h> | ||
52 | 53 | ||
53 | 54 | ||
54 | #define DRIVER_VERSION "v0.6" | 55 | #define DRIVER_VERSION "v0.6" |
@@ -101,7 +102,7 @@ struct usbtouch_usb { | |||
101 | 102 | ||
102 | /* device types */ | 103 | /* device types */ |
103 | enum { | 104 | enum { |
104 | DEVTPYE_DUMMY = -1, | 105 | DEVTYPE_IGNORE = -1, |
105 | DEVTYPE_EGALAX, | 106 | DEVTYPE_EGALAX, |
106 | DEVTYPE_PANJIT, | 107 | DEVTYPE_PANJIT, |
107 | DEVTYPE_3M, | 108 | DEVTYPE_3M, |
@@ -115,8 +116,21 @@ enum { | |||
115 | DEVTYPE_GOTOP, | 116 | DEVTYPE_GOTOP, |
116 | }; | 117 | }; |
117 | 118 | ||
119 | #define USB_DEVICE_HID_CLASS(vend, prod) \ | ||
120 | .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS \ | ||
121 | | USB_DEVICE_ID_MATCH_DEVICE, \ | ||
122 | .idVendor = (vend), \ | ||
123 | .idProduct = (prod), \ | ||
124 | .bInterfaceClass = USB_INTERFACE_CLASS_HID, \ | ||
125 | .bInterfaceProtocol = USB_INTERFACE_PROTOCOL_MOUSE | ||
126 | |||
118 | static struct usb_device_id usbtouch_devices[] = { | 127 | static struct usb_device_id usbtouch_devices[] = { |
119 | #ifdef CONFIG_TOUCHSCREEN_USB_EGALAX | 128 | #ifdef CONFIG_TOUCHSCREEN_USB_EGALAX |
129 | /* ignore the HID capable devices, handled by usbhid */ | ||
130 | {USB_DEVICE_HID_CLASS(0x0eef, 0x0001), .driver_info = DEVTYPE_IGNORE}, | ||
131 | {USB_DEVICE_HID_CLASS(0x0eef, 0x0002), .driver_info = DEVTYPE_IGNORE}, | ||
132 | |||
133 | /* normal device IDs */ | ||
120 | {USB_DEVICE(0x3823, 0x0001), .driver_info = DEVTYPE_EGALAX}, | 134 | {USB_DEVICE(0x3823, 0x0001), .driver_info = DEVTYPE_EGALAX}, |
121 | {USB_DEVICE(0x3823, 0x0002), .driver_info = DEVTYPE_EGALAX}, | 135 | {USB_DEVICE(0x3823, 0x0002), .driver_info = DEVTYPE_EGALAX}, |
122 | {USB_DEVICE(0x0123, 0x0001), .driver_info = DEVTYPE_EGALAX}, | 136 | {USB_DEVICE(0x0123, 0x0001), .driver_info = DEVTYPE_EGALAX}, |
@@ -857,6 +871,10 @@ static int usbtouch_probe(struct usb_interface *intf, | |||
857 | struct usbtouch_device_info *type; | 871 | struct usbtouch_device_info *type; |
858 | int err = -ENOMEM; | 872 | int err = -ENOMEM; |
859 | 873 | ||
874 | /* some devices are ignored */ | ||
875 | if (id->driver_info == DEVTYPE_IGNORE) | ||
876 | return -ENODEV; | ||
877 | |||
860 | interface = intf->cur_altsetting; | 878 | interface = intf->cur_altsetting; |
861 | endpoint = &interface->endpoint[0].desc; | 879 | endpoint = &interface->endpoint[0].desc; |
862 | 880 | ||