aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/input/hid-core.c8
-rw-r--r--drivers/usb/input/hid.h8
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index bb1f5211ff9d..061002fc66fc 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1797,6 +1797,14 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
1797 (hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct))) 1797 (hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct)))
1798 quirks = hid_blacklist[n].quirks; 1798 quirks = hid_blacklist[n].quirks;
1799 1799
1800 /* Many keyboards and mice don't like to be polled for reports,
1801 * so we will always set the HID_QUIRK_NOGET flag for them. */
1802 if (interface->desc.bInterfaceSubClass == USB_INTERFACE_SUBCLASS_BOOT) {
1803 if (interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_KEYBOARD ||
1804 interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE)
1805 quirks |= HID_QUIRK_NOGET;
1806 }
1807
1800 if (quirks & HID_QUIRK_IGNORE) 1808 if (quirks & HID_QUIRK_IGNORE)
1801 return NULL; 1809 return NULL;
1802 1810
diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
index 7efbfff8adde..778e575de352 100644
--- a/drivers/usb/input/hid.h
+++ b/drivers/usb/input/hid.h
@@ -41,6 +41,14 @@
41#define USB_INTERFACE_CLASS_HID 3 41#define USB_INTERFACE_CLASS_HID 3
42 42
43/* 43/*
44 * USB HID interface subclass and protocol codes
45 */
46
47#define USB_INTERFACE_SUBCLASS_BOOT 1
48#define USB_INTERFACE_PROTOCOL_KEYBOARD 1
49#define USB_INTERFACE_PROTOCOL_MOUSE 2
50
51/*
44 * HID class requests 52 * HID class requests
45 */ 53 */
46 54