lib: Add documentation for usb_id
This commit is contained in:
parent
e57f037a10
commit
ca148cbcf1
1 changed files with 27 additions and 0 deletions
|
@ -131,6 +131,33 @@ struct fp_img_dev {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* fp_driver structure definition */
|
/* fp_driver structure definition */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* usb_id:
|
||||||
|
* @vendor: the USB vendor ID
|
||||||
|
* @product: the USB product ID
|
||||||
|
* @driver_data: data to differentiate devices of different
|
||||||
|
* vendor and product IDs.
|
||||||
|
*
|
||||||
|
* The struct #usb_id is used to declare devices supported by a
|
||||||
|
* particular driver. The @driver_data information is used to
|
||||||
|
* differentiate different models of devices which only need
|
||||||
|
* small changes compared to the default driver behaviour to function.
|
||||||
|
*
|
||||||
|
* For example, a device might have a different initialisation from
|
||||||
|
* the stock device, so the driver could do:
|
||||||
|
*
|
||||||
|
* |[<!-- language="C" -->
|
||||||
|
* if (driver_data == MY_DIFFERENT_DEVICE_QUIRK) {
|
||||||
|
* ...
|
||||||
|
* } else {
|
||||||
|
* ...
|
||||||
|
* }
|
||||||
|
* ]|
|
||||||
|
*
|
||||||
|
* The default value is zero, so the @driver_data needs to be a
|
||||||
|
* non-zero to be useful.
|
||||||
|
*/
|
||||||
struct usb_id {
|
struct usb_id {
|
||||||
uint16_t vendor;
|
uint16_t vendor;
|
||||||
uint16_t product;
|
uint16_t product;
|
||||||
|
|
Loading…
Reference in a new issue