Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
usb_configuration Struct Reference

#include <composite.h>

Data Fields

const charlabel
 
struct usb_gadget_strings ** strings
 
struct usb_descriptor_header ** descriptors
 
void(* unbind )(struct usb_configuration *)
 
int(* setup )(struct usb_configuration *, const struct usb_ctrlrequest *)
 
u8 bConfigurationValue
 
u8 iConfiguration
 
u8 bmAttributes
 
u8 bMaxPower
 
struct usb_composite_devcdev
 
struct list_head list
 
struct list_head functions
 
u8 next_interface_id
 
unsigned superspeed:1
 
unsigned highspeed:1
 
unsigned fullspeed:1
 
struct usb_functioninterface [MAX_CONFIG_INTERFACES]
 

Detailed Description

struct usb_configuration - represents one gadget configuration : For diagnostics, describes the configuration. : Tables of strings, keyed by identifiers assigned during () and by language IDs provided in control requests. : Table of descriptors preceding all function descriptors. Examples include OTG and vendor-specific descriptors. : Reverses ; called as a side effect of unregistering the driver which added this configuration. : Used to delegate control requests that aren't handled by standard device infrastructure or directed at a specific interface. : Copied into configuration descriptor. : Copied into configuration descriptor. : Copied into configuration descriptor. : Copied into configuration descriptor. : assigned by () before calling (); this is the device associated with this configuration.

Configurations are building blocks for gadget drivers structured around function drivers. Simple USB gadgets require only one function and one configuration, and handle dual-speed hardware by always providing the same functionality. Slightly more complex gadgets may have more than one single-function configuration at a given speed; or have configurations that only work at one speed.

Composite devices are, by definition, ones with configurations which include more than one function.

The lifecycle of a usb_configuration includes allocation, initialization of the fields described above, and calling () to set up internal data and bind it to a specific device. The configuration's () method is then used to initialize all the functions and then call () for them.

Those functions would normally be independent of each other, but that's not mandatory. CDC WMC devices are an example where functions often depend on other functions, with some functions subsidiary to others. Such interdependency may be managed in any way, so long as all of the descriptors complete by the time the composite driver returns from its bind() routine.

Definition at line 207 of file composite.h.

Field Documentation

u8 bConfigurationValue

Definition at line 223 of file composite.h.

u8 bmAttributes

Definition at line 225 of file composite.h.

u8 bMaxPower

Definition at line 226 of file composite.h.

Definition at line 228 of file composite.h.

struct usb_descriptor_header ** descriptors

Definition at line 210 of file composite.h.

unsigned fullspeed

Definition at line 237 of file composite.h.

struct list_head functions

Definition at line 233 of file composite.h.

unsigned highspeed

Definition at line 236 of file composite.h.

u8 iConfiguration

Definition at line 224 of file composite.h.

Definition at line 238 of file composite.h.

Definition at line 208 of file composite.h.

Definition at line 232 of file composite.h.

u8 next_interface_id

Definition at line 234 of file composite.h.

Definition at line 219 of file composite.h.

Definition at line 209 of file composite.h.

unsigned superspeed

Definition at line 235 of file composite.h.

Definition at line 218 of file composite.h.


The documentation for this struct was generated from the following files: