1USB_ADD_CONFIG(9) Kernel Mode Gadget API USB_ADD_CONFIG(9)
2
3
4
6 usb_add_config - add a configuration to a device.
7
9 int usb_add_config(struct usb_composite_dev * cdev,
10 struct usb_configuration * config,
11 int (*bind) (struct usb_configuration *));
12
14 cdev
15 wraps the USB gadget
16
17 config
18 the configuration, with bConfigurationValue assigned
19
20 bind
21 the configuration's bind function
22
24 single threaded during gadget setup
25
27 One of the main tasks of a composite bind() routine is to add each of
28 the configurations it supports, using this routine.
29
30 This function returns the value of the configuration's bind(), which is
31 zero for success else a negative errno value. Binding configurations
32 assigns global resources including string IDs, and per-configuration
33 resources such as interface IDs and endpoints.
34
36 David Brownell <dbrownell@users.sourceforge.net>
37 Author.
38
40Kernel Hackers Manual 3.10 June 2019 USB_ADD_CONFIG(9)