Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Data Fields
usb_device_id Struct Reference

#include <mod_devicetable.h>

Public Member Functions

kernel_ulong_t driver_info __attribute__ ((aligned(sizeof(kernel_ulong_t))))
 

Data Fields

__u16 match_flags
 
__u16 idVendor
 
__u16 idProduct
 
__u16 bcdDevice_lo
 
__u16 bcdDevice_hi
 
__u8 bDeviceClass
 
__u8 bDeviceSubClass
 
__u8 bDeviceProtocol
 
__u8 bInterfaceClass
 
__u8 bInterfaceSubClass
 
__u8 bInterfaceProtocol
 
__u8 bInterfaceNumber
 

Detailed Description

struct usb_device_id - identifies USB devices for probing and hotplugging : Bit mask controlling of the other fields are used to match against new devices. Any field except for driver_info may be used, although some only make sense in conjunction with other fields. This is usually set by a USB_DEVICE_*() macro, which sets all other fields in this structure except for driver_info. : USB vendor ID for a device; numbers are assigned by the USB forum to its members. : Vendor-assigned product ID. : Low end of range of vendor-assigned product version numbers. This is also used to identify individual product versions, for a range consisting of a single device. : High end of version number range. The range of product versions is inclusive. : Class of device; numbers are assigned by the USB forum. Products may choose to implement classes, or be vendor-specific. Device classes specify behavior of all the interfaces on a devices. : Subclass of device; associated with bDeviceClass. : Protocol of device; associated with bDeviceClass. : Class of interface; numbers are assigned by the USB forum. Products may choose to implement classes, or be vendor-specific. Interface classes specify behavior only of a given interface; other interfaces may support other classes. : Subclass of interface; associated with bInterfaceClass. : Protocol of interface; associated with bInterfaceClass. : Number of interface; composite devices may use fixed interface numbers to differentiate between vendor-specific interfaces. : Holds information used by the driver. Usually it holds a pointer to a descriptor understood by the driver, or perhaps device flags.

In most cases, drivers will create a table of device IDs by using USB_DEVICE(), or similar macros designed for that purpose. They will then export it to userspace using MODULE_DEVICE_TABLE(), and provide it to the USB core through their usb_driver structure.

See the usb_match_id() function for information about how matches are performed. Briefly, you will normally use one of several macros to help construct these entries. Each entry you provide will either identify one or more specific products, or will identify a class of products which have agreed to behave the same. You should put the more specific matches towards the beginning of your table, so that driver_info can record quirks of specific products.

Definition at line 101 of file mod_devicetable.h.

Member Function Documentation

Field Documentation

__u16 bcdDevice_hi

Definition at line 109 of file mod_devicetable.h.

__u16 bcdDevice_lo

Definition at line 108 of file mod_devicetable.h.

__u8 bDeviceClass

Definition at line 112 of file mod_devicetable.h.

__u8 bDeviceProtocol

Definition at line 114 of file mod_devicetable.h.

__u8 bDeviceSubClass

Definition at line 113 of file mod_devicetable.h.

__u8 bInterfaceClass

Definition at line 117 of file mod_devicetable.h.

__u8 bInterfaceNumber

Definition at line 122 of file mod_devicetable.h.

__u8 bInterfaceProtocol

Definition at line 119 of file mod_devicetable.h.

__u8 bInterfaceSubClass

Definition at line 118 of file mod_devicetable.h.

__u16 idProduct

Definition at line 107 of file mod_devicetable.h.

__u16 idVendor

Definition at line 106 of file mod_devicetable.h.

__u16 match_flags

Definition at line 103 of file mod_devicetable.h.


The documentation for this struct was generated from the following file: