mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: Add documentation for usb_id
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user