aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb/composite.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 7651e5bf7487..f821a3ad475d 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -248,6 +248,14 @@ int usb_add_config(struct usb_composite_dev *,
248void usb_remove_config(struct usb_composite_dev *, 248void usb_remove_config(struct usb_composite_dev *,
249 struct usb_configuration *); 249 struct usb_configuration *);
250 250
251/* predefined index for usb_composite_driver */
252enum {
253 USB_GADGET_MANUFACTURER_IDX = 0,
254 USB_GADGET_PRODUCT_IDX,
255 USB_GADGET_SERIAL_IDX,
256 USB_GADGET_FIRST_AVAIL_IDX,
257};
258
251/** 259/**
252 * struct usb_composite_driver - groups configurations into a gadget 260 * struct usb_composite_driver - groups configurations into a gadget
253 * @name: For diagnostics, identifies the driver. 261 * @name: For diagnostics, identifies the driver.
@@ -261,7 +269,9 @@ void usb_remove_config(struct usb_composite_dev *,
261 * @dev: Template descriptor for the device, including default device 269 * @dev: Template descriptor for the device, including default device
262 * identifiers. 270 * identifiers.
263 * @strings: tables of strings, keyed by identifiers assigned during @bind 271 * @strings: tables of strings, keyed by identifiers assigned during @bind
264 * and language IDs provided in control requests 272 * and language IDs provided in control requests. Note: The first entries
273 * are predefined. The first entry that may be used is
274 * USB_GADGET_FIRST_AVAIL_IDX
265 * @max_speed: Highest speed the driver supports. 275 * @max_speed: Highest speed the driver supports.
266 * @needs_serial: set to 1 if the gadget needs userspace to provide 276 * @needs_serial: set to 1 if the gadget needs userspace to provide
267 * a serial number. If one is not provided, warning will be printed. 277 * a serial number. If one is not provided, warning will be printed.