HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen
authorForest Bond <forest.bond@rapidrollout.com>
Tue, 6 Nov 2012 18:41:22 +0000 (13:41 -0500)
committerJiri Kosina <jkosina@suse.cz>
Wed, 7 Nov 2012 10:51:28 +0000 (11:51 +0100)
Previously, both usbhid and usbtouchscreen would bind to D-WAV devices
with class HID and protocol None, so they would be claimed by whichever
driver was loaded first.  Some of these devices do in fact work with
usbhid, but not all of them do.  OTOH they all work with usbtouchscreen
as of commit 037a833ed05a86d01ea27a2c32043b86c549be1b ("Input:
usbtouchscreen - initialize eGalax devices").  So we ignore them in
usbhid to prevent getting in the way of usbtouchscreen and claiming an
interface that we may not be able to do anything useful with.

Signed-off-by: Forest Bond <forest.bond@rapidrollout.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
drivers/hid/hid-ids.h

index 0a6b36fbb4ce9bd87bd2cc1d59c3500733a4e16f..a7550bb30836cec9a999ab86f26c12889d6392a8 100644 (file)
@@ -2183,7 +2183,16 @@ static bool hid_ignore(struct hid_device *hdev)
                if (hdev->product == USB_DEVICE_ID_JESS_YUREX &&
                                hdev->type == HID_TYPE_USBNONE)
                        return true;
-       break;
+               break;
+       case USB_VENDOR_ID_DWAV:
+               /* These are handled by usbtouchscreen. hdev->type is probably
+                * HID_TYPE_USBNONE, but we say !HID_TYPE_USBMOUSE to match
+                * usbtouchscreen. */
+               if ((hdev->product == USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER ||
+                    hdev->product == USB_DEVICE_ID_DWAV_TOUCHCONTROLLER) &&
+                   hdev->type != HID_TYPE_USBMOUSE)
+                       return true;
+               break;
        }
 
        if (hdev->type == HID_TYPE_USBMOUSE &&
index 9bc8d570777a1605879781f7ed77420c46ded922..6a971477535c1d05446f7b5bf747378b2ba6672a 100644 (file)
 
 #define USB_VENDOR_ID_DWAV             0x0eef
 #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER   0x0001
+#define USB_DEVICE_ID_DWAV_TOUCHCONTROLLER     0x0002
 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D      0x480d
 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E      0x480e
 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7207      0x7207