diff options
author | Rosen Kolev <rosen.kolev@amk-drives.bg> | 2011-09-21 18:11:13 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-09-23 08:53:22 +0200 |
commit | 108b029b68c41f1d3ffada83c6c494e7f75e660e (patch) | |
tree | 4aa95f2670c614c0f9128f0a09679c32df757bf2 /include/usb/usb.h | |
parent | 98e43c5b30f67c60476228225e8cf4d5c12bf021 (diff) | |
download | barebox-108b029b68c41f1d3ffada83c6c494e7f75e660e.tar.gz barebox-108b029b68c41f1d3ffada83c6c494e7f75e660e.tar.xz |
Extended USB device matching.
Extended the USB device matching, adding checks for interface class,
interface subclass, and interface protocol.
Diffstat (limited to 'include/usb/usb.h')
-rw-r--r-- | include/usb/usb.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/usb/usb.h b/include/usb/usb.h index 67157863f7..08fd1a1185 100644 --- a/include/usb/usb.h +++ b/include/usb/usb.h @@ -480,6 +480,13 @@ struct usb_device_id { #define USB_DEVICE_ID_MATCH_VENDOR 0x0001 #define USB_DEVICE_ID_MATCH_DEVICE \ (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) +#define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080 +#define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100 +#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200 +#define USB_DEVICE_ID_MATCH_INT_INFO \ + (USB_DEVICE_ID_MATCH_INT_CLASS | \ + USB_DEVICE_ID_MATCH_INT_SUBCLASS | \ + USB_DEVICE_ID_MATCH_INT_PROTOCOL) /** * USB_DEVICE - macro used to describe a specific usb device @@ -494,6 +501,21 @@ struct usb_device_id { .idVendor = (vend), \ .idProduct = (prod) +/** + * USB_INTERFACE_INFO - macro used to describe a class of usb interfaces + * @cl: bInterfaceClass value + * @sc: bInterfaceSubClass value + * @pr: bInterfaceProtocol value + * + * This macro is used to create a struct usb_device_id that matches a + * specific class of interfaces. + */ +#define USB_INTERFACE_INFO(cl, sc, pr) \ + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, \ + .bInterfaceClass = (cl), \ + .bInterfaceSubClass = (sc), \ + .bInterfaceProtocol = (pr) + #define USB_CTRL_SET_TIMEOUT 5000 #define USB_CTRL_GET_TIMEOUT 5000 |