1 #ifndef DEVMAN_USB_DRIVER
2 #define DEVMAN_USB_DRIVER
7 #define USB_MATCH_ID_VENDOR (1 << 0)
8 #define USB_MATCH_ID_PRODUCT (1 << 1)
9 #define USB_MATCH_BCD_DEVICE (1 << 2)
10 #define USB_MATCH_DEVICE_CLASS (1 << 3)
11 #define USB_MATCH_DEVICE_SUBCLASS (1 << 4)
12 #define USB_MATCH_DEVICE_PROTOCOL (1 << 5)
13 #define USB_MATCH_INTERFACE_CLASS (1 << 6)
14 #define USB_MATCH_INTERFACE_SUBCLASS (1 << 7)
15 #define USB_MATCH_INTERFACE_PROTOCOL (1 << 8)
17 enum devmand_device_type
{
22 struct devmand_usb_match_id
{
24 struct usb_device_id match_id
;
25 LIST_ENTRY(devmand_usb_match_id
) list
;
28 #define DEVMAND_DRIVER_LABEL_LEN 32
30 struct devmand_driver_instance
{
33 char label
[DEVMAND_DRIVER_LABEL_LEN
];
34 struct devmand_usb_driver
*drv
;
35 LIST_ENTRY(devmand_driver_instance
) list
;
38 struct devmand_usb_driver
{
44 enum devmand_device_type dev_type
;
45 LIST_HEAD(devid_head
, devmand_usb_match_id
) ids
;
46 LIST_ENTRY(devmand_usb_driver
) list
;
49 struct devmand_usb_driver
* add_usb_driver(char *name
);
50 struct devmand_usb_match_id
*add_usb_match_id(struct devmand_usb_driver
*drv
);