table of contents
- stretch 4.9.168-1
STRUCT USB_HOST_CONF(9) | Host-Side Data Types and Macro | STRUCT USB_HOST_CONF(9) |
NAME¶
struct_usb_host_config - representation of a device's configurationSYNOPSIS¶
struct usb_host_config { struct usb_config_descriptor desc; char * string; struct usb_interface_assoc_descriptor * intf_assoc[USB_MAXIADS]; struct usb_interface * interface[USB_MAXINTERFACES]; struct usb_interface_cache * intf_cache[USB_MAXINTERFACES]; unsigned char * extra; int extralen; };
MEMBERS¶
descstring
intf_assoc[USB_MAXIADS]
interface[USB_MAXINTERFACES]
intf_cache[USB_MAXINTERFACES]
extra
extralen
DESCRIPTION¶
USB devices may have multiple configurations, but only one can be active at any time. Each encapsulates a different operational environment; for example, a dual-speed device would have separate configurations for full-speed and high-speed operation. The number of configurations available is stored in the device descriptor as bNumConfigurations.A configuration can contain multiple interfaces. Each corresponds to a different function of the USB device, and all are available whenever the configuration is active. The USB standard says that interfaces are supposed to be numbered from 0 to desc.bNumInterfaces-1, but a lot of devices get this wrong. In addition, the interface array is not guaranteed to be sorted in numerical order. Use usb_ifnum_to_if to look up an interface entry based on its number.
Device drivers should not attempt to activate configurations. The choice of which configuration to install is a policy decision based on such considerations as available power, functionality provided, and the user's desires (expressed through userspace tools). However, drivers can call usb_reset_configuration to reinitialize the current configuration and all its interfaces.
COPYRIGHT¶
April 2019 | Kernel Hackers Manual 4.9. |