aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mod_devicetable.h
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2012-05-18 15:27:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-13 18:40:09 -0400
commit81df2d594340dcb6d1a02191976be88a1ca8120c (patch)
treef5a20ebf416c03b41611518d54706019d0c0ffa2 /include/linux/mod_devicetable.h
parent7e97243c2080ecae7129e83635227fdebd4feef6 (diff)
USB: allow match on bInterfaceNumber
Some composite USB devices provide multiple interfaces with different functions, all using "vendor-specific" for class/subclass/protocol. Another OS use interface numbers to match the driver and interface. It seems these devices are designed with that in mind - using static interface numbers for the different functions. This adds support for matching against the bInterfaceNumber, allowing such devices to be supported without having to resort to testing against interface number whitelists and/or blacklists in the probe. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/mod_devicetable.h')
-rw-r--r--include/linux/mod_devicetable.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 5db93821f9c7..7771d453e5f3 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -78,6 +78,9 @@ struct ieee1394_device_id {
78 * of a given interface; other interfaces may support other classes. 78 * of a given interface; other interfaces may support other classes.
79 * @bInterfaceSubClass: Subclass of interface; associated with bInterfaceClass. 79 * @bInterfaceSubClass: Subclass of interface; associated with bInterfaceClass.
80 * @bInterfaceProtocol: Protocol of interface; associated with bInterfaceClass. 80 * @bInterfaceProtocol: Protocol of interface; associated with bInterfaceClass.
81 * @bInterfaceNumber: Number of interface; composite devices may use
82 * fixed interface numbers to differentiate between vendor-specific
83 * interfaces.
81 * @driver_info: Holds information used by the driver. Usually it holds 84 * @driver_info: Holds information used by the driver. Usually it holds
82 * a pointer to a descriptor understood by the driver, or perhaps 85 * a pointer to a descriptor understood by the driver, or perhaps
83 * device flags. 86 * device flags.
@@ -115,6 +118,9 @@ struct usb_device_id {
115 __u8 bInterfaceSubClass; 118 __u8 bInterfaceSubClass;
116 __u8 bInterfaceProtocol; 119 __u8 bInterfaceProtocol;
117 120
121 /* Used for vendor-specific interface matches */
122 __u8 bInterfaceNumber;
123
118 /* not matched against */ 124 /* not matched against */
119 kernel_ulong_t driver_info; 125 kernel_ulong_t driver_info;
120}; 126};
@@ -130,6 +136,7 @@ struct usb_device_id {
130#define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080 136#define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080
131#define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100 137#define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100
132#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200 138#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200
139#define USB_DEVICE_ID_MATCH_INT_NUMBER 0x0400
133 140
134#define HID_ANY_ID (~0) 141#define HID_ANY_ID (~0)
135#define HID_BUS_ANY 0xffff 142#define HID_BUS_ANY 0xffff