usb_add_config(9)

usb_add_config9

Add a configuration to a device.

Usage

int usb_add_config(struct usb_composite_dev * cdev, struct usb_configuration * config, int (*bind) (struct usb_configuration *));

Arguments

cdev

wraps the USB gadget

config

the configuration, with bConfigurationValue assigned

bind

the configuration's bind function

Context

single threaded during gadget setup

Overview

One of the main tasks of a composite bind() routine is to add each of the configurations it supports, using this routine.

This function returns the value of the configuration's bind(), which is zero for success else a negative errno value. Binding configurations assigns global resources including string IDs, and per-configuration resources such as interface IDs and endpoints.

Releases

4 releases since Debian 6.0 (Squeeze); the text changed 3 times.

  1. 6.0
  2. 7
  3. 8
  4. 9

Author

David Brownell <[email protected]>

Author.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.