From: Luis R. Rodriguez Date: Wed, 12 Dec 2012 02:47:44 +0000 (-0800) Subject: compat: backport definition of HID_TYPE_USBNONE X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=baab561aec208a7b1c583dae9d51d745dd2c262d;p=openwrt%2Fstaging%2Fblogic.git compat: backport definition of HID_TYPE_USBNONE This is declared within the enum: enum hid_type { HID_TYPE_OTHER = 0, HID_TYPE_USBMOUSE, HID_TYPE_USBNONE }; But we just declare it as a define for 2. This backports was added with the below commit: mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 6dc1418e v3.1-rc1~309^2^2~14 commit 6dc1418e13144162e8bc4858789010d8f0e1e65c Author: Tomoki Sekiyama Date: Mon May 23 15:45:44 2011 -0700 HID: yurex: recognize GeneralKeys wireless presenter as generic HID Unfortunately, the device seems to have the same Vendor ID and Product ID as YUREX leg-shakes sensors, and the commit 6bc235a2e2 ("USB: add driver for Meywa-Denki & Kayac YUREX") added the ID to hid_ignore_list. I believe that we can distinguish YUREX and the Wireless Presenter by device type. The patch below makes the driver ignore only YUREX (bInterfaceProtocol==0), and recognize Wireless Presenter (bInterfaceProtocol is keyboard or mouse) as generic HID. (I don't have the Wireless Presenter, so not yet ested.) ** YUREX lsusb information: Bus 002 Device 007: ID 0c45:1010 Microdia Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0c45 Microdia idProduct 0x1010 bcdDevice 0.03 iManufacturer 1 JESS iProduct 2 YUREX iSerial 3 10000269 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 31 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Device Status: 0x0002 (Bus Powered) Remote Wakeup Enabled Addresses https://bugzilla.kernel.org/show_bug.cgi?id=26922 Signed-off-by: Tomoki Sekiyama Cc: Greg KH Cc: "Rafael J. Wysocki" Cc: Maciej Rutecki Reported-by: Thomas B?chler Tested-by: Thomas B?chler Signed-off-by: Andrew Morton Signed-off-by: Jiri Kosina Signed-off-by: Luis R. Rodriguez --- diff --git a/include/linux/compat-3.1.h b/include/linux/compat-3.1.h index 3afca9a6b607..9d78b7d62e06 100644 --- a/include/linux/compat-3.1.h +++ b/include/linux/compat-3.1.h @@ -11,6 +11,7 @@ #include #include +#define HID_TYPE_USBNONE 2 /* This backports: *