aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/usb.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 3d63e0c2dd70..98e0338664fb 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -771,6 +771,28 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor
771 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \ 771 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \
772 .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) 772 .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr)
773 773
774/**
775 * USB_DEVICE_AND_INTERFACE_INFO - macro used to describe a specific usb device
776 * with a class of usb interfaces
777 * @vend: the 16 bit USB Vendor ID
778 * @prod: the 16 bit USB Product ID
779 * @cl: bInterfaceClass value
780 * @sc: bInterfaceSubClass value
781 * @pr: bInterfaceProtocol value
782 *
783 * This macro is used to create a struct usb_device_id that matches a
784 * specific device with a specific class of interfaces.
785 *
786 * This is especially useful when explicitly matching devices that have
787 * vendor specific bDeviceClass values, but standards-compliant interfaces.
788 */
789#define USB_DEVICE_AND_INTERFACE_INFO(vend,prod,cl,sc,pr) \
790 .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \
791 | USB_DEVICE_ID_MATCH_DEVICE, \
792 .idVendor = (vend), .idProduct = (prod), \
793 .bInterfaceClass = (cl), \
794 .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr)
795
774/* ----------------------------------------------------------------------- */ 796/* ----------------------------------------------------------------------- */
775 797
776/* Stuff for dynamic usb ids */ 798/* Stuff for dynamic usb ids */