da4243145f
Add handling of OS Extended Compatibility descriptors from configfs interface. Hosts which expect the "OS Descriptors" ask only for configurations @ index 0, but linux-based USB devices can provide more than one configuration. This patch adds marking one of gadget's configurations the configuration to be reported at index 0, regardless of the actual sequence of usb_add_config invocations used for adding the configurations. The configuration is selected by creating a symbolic link pointing to it from the "os_desc" directory located at the top of a gadget's directory hierarchy. One kind of "OS Descriptors" are "Extended Compatibility Descriptors", which need to be specified per interface. This patch adds interface.<n> directory in function's configfs directory to represent each interface defined by the function. Each interface's directory contains two attributes: "compatible_id" and "sub_compatible_id", which represent 8-byte strings to be reported to the host as the "Compatible ID" and "Sub Compatible ID". Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
106 lines
2.8 KiB
Plaintext
106 lines
2.8 KiB
Plaintext
What: /config/usb-gadget
|
|
Date: Jun 2013
|
|
KernelVersion: 3.11
|
|
Description:
|
|
This group contains sub-groups corresponding to created
|
|
USB gadgets.
|
|
|
|
What: /config/usb-gadget/gadget
|
|
Date: Jun 2013
|
|
KernelVersion: 3.11
|
|
Description:
|
|
|
|
The attributes of a gadget:
|
|
|
|
UDC - bind a gadget to UDC/unbind a gadget;
|
|
write UDC's name found in /sys/class/udc/*
|
|
to bind a gadget, empty string "" to unbind.
|
|
|
|
bDeviceClass - USB device class code
|
|
bDeviceSubClass - USB device subclass code
|
|
bDeviceProtocol - USB device protocol code
|
|
bMaxPacketSize0 - maximum endpoint 0 packet size
|
|
bcdDevice - bcd device release number
|
|
bcdUSB - bcd USB specification version number
|
|
idProduct - product ID
|
|
idVendor - vendor ID
|
|
|
|
What: /config/usb-gadget/gadget/configs
|
|
Date: Jun 2013
|
|
KernelVersion: 3.11
|
|
Description:
|
|
This group contains a USB gadget's configurations
|
|
|
|
What: /config/usb-gadget/gadget/configs/config
|
|
Date: Jun 2013
|
|
KernelVersion: 3.11
|
|
Description:
|
|
The attributes of a configuration:
|
|
|
|
bmAttributes - configuration characteristics
|
|
MaxPower - maximum power consumption from the bus
|
|
|
|
What: /config/usb-gadget/gadget/configs/config/strings
|
|
Date: Jun 2013
|
|
KernelVersion: 3.11
|
|
Description:
|
|
This group contains subdirectories for language-specific
|
|
strings for this configuration.
|
|
|
|
What: /config/usb-gadget/gadget/configs/config/strings/language
|
|
Date: Jun 2013
|
|
KernelVersion: 3.11
|
|
Description:
|
|
The attributes:
|
|
|
|
configuration - configuration description
|
|
|
|
|
|
What: /config/usb-gadget/gadget/functions
|
|
Date: Jun 2013
|
|
KernelVersion: 3.11
|
|
Description:
|
|
This group contains functions available to this USB gadget.
|
|
|
|
What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>
|
|
Date: May 2014
|
|
KernelVersion: 3.16
|
|
Description:
|
|
This group contains "Feature Descriptors" specific for one
|
|
gadget's USB interface or one interface group described
|
|
by an IAD.
|
|
|
|
The attributes:
|
|
|
|
compatible_id - 8-byte string for "Compatible ID"
|
|
sub_compatible_id - 8-byte string for "Sub Compatible ID"
|
|
|
|
What: /config/usb-gadget/gadget/strings
|
|
Date: Jun 2013
|
|
KernelVersion: 3.11
|
|
Description:
|
|
This group contains subdirectories for language-specific
|
|
strings for this gadget.
|
|
|
|
What: /config/usb-gadget/gadget/strings/language
|
|
Date: Jun 2013
|
|
KernelVersion: 3.11
|
|
Description:
|
|
The attributes:
|
|
|
|
serialnumber - gadget's serial number (string)
|
|
product - gadget's product description
|
|
manufacturer - gadget's manufacturer description
|
|
|
|
What: /config/usb-gadget/gadget/os_desc
|
|
Date: May 2014
|
|
KernelVersion: 3.16
|
|
Description:
|
|
This group contains "OS String" extension handling attributes.
|
|
|
|
use - flag turning "OS Desctiptors" support on/off
|
|
b_vendor_code - one-byte value used for custom per-device and
|
|
per-interface requests
|
|
qw_sign - an identifier to be reported as "OS String"
|
|
proper
|