u-boot-brain/drivers/usb/gadget
Li Jun 1c7aacb9a8 usb: gadget: OS String support
This is a porting patch from linux kernel: 19824d5eeece
("usb: gadget: OS String support"), 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 String" under index 0xEE of language 0.
The contents of the string is generated based on the qw_sign
array and b_vendor_code.

Interested gadgets need to set the cdev->use_os_string flag,
fill cdev->qw_sign with appropriate values and fill cdev->b_vendor_code
with a value of their choice.

This patch does not however implement responding to any vendor-specific
USB requests."

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
..
udc dma-mapping: move dma_map_(un)single() to <linux/dma-mapping.h> 2020-02-19 21:27:30 +08:00
at91_udc.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
at91_udc.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
atmel_usba_udc.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
atmel_usba_udc.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm_udc_otg_phy.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
bcm_udc_otg.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ci_udc.c usb: ci_udc: Add function to remove usb device 2020-09-01 14:47:43 +02:00
ci_udc.h ci_udc: Update the ci_udc driver to support bulk transfers 2015-05-29 12:41:04 +02:00
composite.c usb: gadget: OS String support 2021-01-31 14:08:56 +01:00
config.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
core.c usb: gadget: Do not export usbd_device_* arrays 2021-01-31 14:08:56 +01:00
designware_udc.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
dwc2_udc_otg_phy.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
dwc2_udc_otg_priv.h usb: dwc2_udc_otg: Read MAX_HW_ENDPOINT from HWCFG4 register 2019-04-21 10:26:52 +02:00
dwc2_udc_otg_regs.h usb: dwc2: add "u-boot,force-vbus-detection" for stm32 2020-11-22 13:18:20 +01:00
dwc2_udc_otg_xfer_dma.c usb: dwc2: Fix control OUT transfer issue 2020-10-20 00:48:58 +02:00
dwc2_udc_otg.c dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
ep0.c usb: gadget: Do not export usbd_device_* arrays 2021-01-31 14:08:56 +01:00
ep0.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
epautoconf.c usb: gadget: don't change ep name for dwc3 while ep autoconfig 2021-01-31 14:08:56 +01:00
ether.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
f_dfu.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
f_dfu.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
f_fastboot.c f_fastboot: Avoid use-after-free in the global pointer variable 2021-01-31 14:08:56 +01:00
f_mass_storage.c usb: gadget: Fix controller index in UMS 2020-09-01 14:47:43 +02:00
f_rockusb.c f_rockusb: Avoid use-after-free in the global pointer variable 2021-01-31 14:08:56 +01:00
f_sdp.c f_sdp: Change bInterval of interrupt endpoint to 3 2020-09-01 14:47:43 +02:00
f_thor.c thor: add support for the dfu_alt_info reintialization from the flashed script 2021-01-31 14:08:56 +01:00
f_thor.h gadget: f_thor: update to support more than 4GB file as thor 5.0 2018-05-18 13:17:30 +02:00
fotg210.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
g_dnl.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
gadget_chips.h usb: gadget: Add bcdDevice for the MTU3 USB Gadget Controller 2020-10-20 00:49:05 +02:00
Kconfig usb: max3420: add the gadget driver 2020-09-01 14:47:43 +02:00
Makefile usb: max3420: add the gadget driver 2020-09-01 14:47:43 +02:00
max3420_udc.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
ndis.h USB: Add USB RNDIS gadget protocol 2011-02-19 20:32:37 +01:00
pxa25x_udc.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pxa25x_udc.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pxa27x_udc.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
rndis.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rndis.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
storage_common.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
usbstring.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00