最終更新:2015-10-22 (木) 07:42:11 (1806d)  

usb_device_id
Top / usb_device_id

identifies USB devices for probing and hotplugging

struct usb_device_id {
        /* which fields to match against? */
        __u16           match_flags;

        /* Used for product specific matches; range is inclusive */
        __u16           idVendor;
        __u16           idProduct;
        __u16           bcdDevice_lo;
        __u16           bcdDevice_hi;

        /* Used for device class matches */
        __u8            bDeviceClass;
        __u8            bDeviceSubClass;
        __u8            bDeviceProtocol;

        /* Used for interface class matches */
        __u8            bInterfaceClass;
        __u8            bInterfaceSubClass;
        __u8            bInterfaceProtocol;

        /* Used for vendor-specific interface matches */
        __u8            bInterfaceNumber;

        /* not matched against */
        kernel_ulong_t  driver_info
                __attribute__((aligned(sizeof(kernel_ulong_t))));
};

関連マクロ

linux/mod_devicetable.h

  • USB_DEVICE_ID_MATCH_VENDOR?0x0001
    USB_DEVICE_ID_MATCH_PRODUCT?0x0002
    USB_DEVICE_ID_MATCH_DEV_LO?0x0004
    USB_DEVICE_ID_MATCH_DEV_HI?0x0008
    USB_DEVICE_ID_MATCH_DEV_CLASS?0x0010
    USB_DEVICE_ID_MATCH_DEV_SUBCLASS?0x0020
    USB_DEVICE_ID_MATCH_DEV_PROTOCOL?0x0040
    USB_DEVICE_ID_MATCH_INT_CLASS?0x0080
    USB_DEVICE_ID_MATCH_INT_SUBCLASS?0x0100
    USB_DEVICE_ID_MATCH_INT_PROTOCOL?0x0200
    USB_DEVICE_ID_MATCH_INT_NUMBER?0x0400

linux/usb.h

  • USB_DEVICE_ID_MATCH_DEVICE?
  • USB_DEVICE_ID_MATCH_DEV_RANGE?
  • USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION?
  • USB_DEVICE_ID_MATCH_DEV_INFO?
  • USB_DEVICE_ID_MATCH_INT_INFO?
  • USB_DEVICE(vend, prod)
  • USB_DEVICE_VER?(vend, prod, lo, hi)
  • USB_DEVICE_INTERFACE_CLASS?(vend, prod, cl)
  • USB_DEVICE_INTERFACE_PROTOCOL?(vend, prod, pr)
  • USB_DEVICE_INTERFACE_NUMBER?(vend, prod, num)
  • USB_DEVICE_INFO?(cl, sc, pr)
  • USB_INTERFACE_INFO?(cl, sc, pr)
  • USB_DEVICE_AND_INTERFACE_INFO?(vend, prod, cl, sc, pr)

関連