u-boot-brain/drivers
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
..
adc - sync amlogic GX & AXG DT to Linux 5.10 2021-01-13 07:32:02 -05:00
ata dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
axi dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
bios_emulator common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
block dm: treewide: Rename dev_get_platdata() to dev_get_plat() 2020-12-13 16:51:09 -07:00
bootcount dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
bus bus: ti: am33xx: add pwm subsystem driver 2021-01-12 10:58:05 +05:30
button dm: treewide: Rename 'platdata' variables to just 'plat' 2020-12-13 16:51:08 -07:00
cache dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
clk Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi 2021-01-25 19:46:02 -05:00
core dm: core: add function uclass_probe_all() to probe all devices 2021-01-16 14:49:09 -05:00
cpu dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
crypto dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO() 2021-01-05 12:26:35 -07:00
ddr imx: ddr: imx8m: Move selfref_en after DDR scrub 2021-01-23 11:30:30 +01:00
demo dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO() 2021-01-05 12:26:35 -07:00
dfu dfu: add 'SCRIPT' entity 2021-01-31 14:08:56 +01:00
dma dma: bcm6348: incorrect buffer allocation 2021-01-18 15:23:06 -05:00
fastboot disk: dos: rename write_mbr_partition to write_mbr_sector 2021-01-15 14:38:00 -05:00
firmware dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET() 2021-01-05 12:26:35 -07:00
fpga arm: socfpga: soc64: Add ATF support for FPGA reconfig driver 2021-01-15 17:48:37 +08:00
gpio gpio: Add support for DM GPIO for Kirkwood 2021-01-27 07:25:39 +01:00
hwspinlock hwspinlock: stm32: migrate trace to log macro 2021-01-13 09:52:58 +01:00
i2c i2c: mvtwsi: sunxi: update macro 2021-01-25 21:52:00 +00:00
input dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
led dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
mailbox mailbox: stm32-ipcc: migrate trace to dev and log macro 2021-01-13 09:52:58 +01:00
memory memory: stm32-fmc2: migrate trace to dev and log macro 2021-01-13 09:52:58 +01:00
misc misc: rcc: keep the rcc device name for subnode 2021-01-13 09:52:58 +01:00
mmc mmc: pci_mmc: Set the removable flag 2021-01-27 17:03:16 -05:00
mtd mtd: remove drivers/mtd/mw_eeprom.c 2021-01-18 15:23:06 -05:00
mux dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
net net: phy: micrel: Try default PHY ofnode first 2021-01-27 10:47:54 -05:00
nvme Prepare v2021.01-rc5 2021-01-05 16:20:26 -05:00
pch dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pci pci: Remove CONFIG_PCI_ENUM_ONLY as it's not used (any more) 2021-01-27 17:03:16 -05:00
pci_endpoint common: board_r: Drop initr_pci_ep wrapper 2021-01-15 14:36:12 -05:00
phy phy: add USB PHY driver for MediaTek MT7620 SoC 2021-01-24 21:39:26 +01:00
pinctrl - MIPS: add support for Mediatek MT7620 SoCs 2021-01-25 14:38:40 -05:00
power sunxi: Add support for H616 SoC 2021-01-25 21:52:01 +00:00
pwm dm: fix build errors generated by last merges 2021-01-15 13:12:38 -05:00
qe drivers: qe: avoid double free() 2021-01-18 15:23:06 -05:00
ram ram: aspeed: Add AST2600 DRAM control support 2021-01-18 15:19:15 -05:00
remoteproc remoproc: stm32: migrate trace to log macro 2021-01-13 09:52:58 +01:00
reset reset: reset-mtmips: add DM_FLAG_PRE_RELOC flag 2021-01-24 21:39:27 +01:00
rng dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
rtc rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc 2021-01-27 17:07:48 -05:00
scsi dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
serial serial: a3720: Implement pending method for output direction 2021-01-27 13:12:51 +01:00
smem soc: qualcomm: Fix not calling dev_err with a device 2020-09-30 08:53:43 -04:00
soc dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
sound dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
spi spi: mtk_snor: add support for MTK SPI NOR controller 2021-01-29 10:35:14 -05:00
spmi dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
sysinfo dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
sysreset aspeed: Add AST2600 platform support 2021-01-18 15:23:06 -05:00
tee dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
thermal dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
timer timer: mtk_timer: initialize the timer before use 2021-01-18 15:23:06 -05:00
tpm dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
ufs dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
usb usb: gadget: OS Feature Descriptors support 2021-01-31 14:08:56 +01:00
video video: Allow syncing the entire framebuffer to the copy 2021-01-27 17:03:16 -05:00
virtio dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
w1 w1: mxc: fix build 2021-01-23 11:30:31 +01:00
w1-eeprom dm: treewide: Rename 'platdata' variables to just 'plat' 2020-12-13 16:51:08 -07:00
watchdog watchdog: add watchdog driver for MediaTek MT7620 SoC 2021-01-24 21:39:26 +01:00
xen common: board_r: Drop initr_xen wrapper 2021-01-15 14:36:12 -05:00
Kconfig board: Rename uclass to sysinfo 2020-11-06 10:18:20 +08:00
Makefile bootcount: allow to use this feature on TPL 2021-01-27 16:58:57 -05:00