u-boot-brain/drivers/usb
Li Jun a764c94128 usb: gadget: OS Feature Descriptors support
This is a proting patch from linux kernel: 37a3a533429e
("usb: gadget: OS Feature Descriptors support"), the original commit
log see below:

There is a custom (non-USB IF) extension to the USB standard:

http://msdn.microsoft.com/library/windows/hardware/gg463182

They grant permission to use the specification - there is
"Microsoft OS Descriptor Specification License Agreement"
under the link mentioned above, and its Section 2 "Grant
of License", letter (b) reads:

"Patent license. Microsoft hereby grants to You a nonexclusive,
royalty-free, nontransferable, worldwide license under Microsoft鈥檚
patents embodied solely within the Specification and that are owned
or licensable by Microsoft to make, use, import, offer to sell,
sell and distribute directly or indirectly to Your Licensees Your
Implementation. You may sublicense this patent license to Your
Licensees under the same terms and conditions."

The said extension is maintained by Microsoft for Microsoft.

Yet it is fairly common for various devices to use it, and a
popular proprietary operating system expects devices to provide
"OS descriptors", so Linux-based USB gadgets whishing to be able
to talk to a variety of operating systems should be able to provide
the "OS descriptors".

This patch adds optional support for gadgets whishing to expose
the so called "OS Feature Descriptors", that is "Extended Compatibility ID"
and "Extended Properties".

Hosts which do request "OS descriptors" from gadgets do so during
the enumeration phase and before the configuration is set with
SET_CONFIGURATION. What is more, those hosts never ask for configurations
at indices other than 0. Therefore, gadgets whishing to provide
"OS descriptors" must designate one configuration to be used with
this kind of hosts - this is what os_desc_config is added for in
struct usb_composite_dev. There is an additional advantage to it:
if a gadget provides "OS descriptors" and designates one configuration
to be used with such non-USB-compliant hosts it can invoke
"usb_add_config" in any order because the designated configuration
will be reported to be at index 0 anyway.

This patch also adds handling vendor-specific requests addressed
at device or interface and related to handling "OS descriptors"."

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-31 14:08:56 +01:00
..
cdns3 dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
common usb: common: add define of usb_speed_string() 2020-10-20 00:49:05 +02:00
dwc3 Driver model: make some udevice fields private 2021-01-05 22:34:43 -05:00
emul dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
eth Prepare v2021.01-rc5 2021-01-05 16:20:26 -05:00
gadget usb: gadget: OS Feature Descriptors support 2021-01-31 14:08:56 +01:00
host Driver model: make some udevice fields private 2021-01-05 22:34:43 -05:00
mtu3 dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
musb common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
musb-new dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
phy common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ulpi common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
Kconfig cosmetic: fix typo in drivers/usb/Kconfig 2021-01-04 09:10:17 -05:00