Composite Device Framework

struct usb_os_desc_ext_prop — describes one Extended Property
struct usb_os_desc — describes OS descriptors associated with one interface
struct usb_os_desc_table — describes OS descriptors associated with one interface of a usb_function
struct usb_function — describes one function of a configuration
struct usb_configuration — represents one gadget configuration
struct usb_composite_driver — groups configurations into a gadget
module_usb_composite_driver — Helper macro for registering a USB gadget composite driver
struct usb_composite_dev — represents one composite usb gadget
config_ep_by_speed — configures the given endpoint according to gadget speed.
usb_add_function — add a function to a configuration
usb_function_deactivate — prevent function and gadget enumeration
usb_function_activate — allow function and gadget enumeration
usb_interface_id — allocate an unused interface ID
usb_add_config — add a configuration to a device.
usb_string_id — allocate an unused string ID
usb_string_ids_tab — allocate unused string IDs in batch
usb_gstrings_attach — attach gadget strings to a cdev and assign ids
usb_string_ids_n — allocate unused string IDs in batch
usb_composite_probe — register a composite driver
usb_composite_unregister — unregister a composite driver
usb_composite_setup_continue — Continue with the control transfer

The core API is sufficient for writing drivers for composite USB devices (with more than one function in a given configuration), and also multi-configuration devices (also more than one function, but not necessarily sharing a given configuration). There is however an optional framework which makes it easier to reuse and combine functions.

Devices using this framework provide a struct usb_composite_driver, which in turn provides one or more struct usb_configuration instances. Each such configuration includes at least one struct usb_function, which packages a user visible role such as "network link" or "mass storage device". Management functions may also exist, such as "Device Firmware Upgrade".