u-boot/drivers/usb/gadget
Marek Vasut 718f1d414e usb: gadget: ether: Handle gadget driver registration in probe and remove
Move the ethernet gadget driver registration and removal from ethernet
bind and unbind callbacks into driver DM probe and remove callbacks.
This way, when the driver is bound, which is triggered deliberately
using 'bind' command, the USB ethernet gadget driver is instantiated
and bound to the matching UDC. In reverse, when the driver is unbound,
which is again triggered deliberately using 'unbind' command, the USB
ethernet gadget driver instance is removed.

Effectively, this now behaves like running either 'ums' or 'dfu' or
any other commands utilizing USB gadget functionality.

This also drops use of usb_gadget_release() and moves the use of
usb_gadget_initialize() into usb_ether_init() used only by legacy
platforms that do not use 'bind' command properly yet. Those have
no place in drivers.

Signed-off-by: Marek Vasut <marex@denx.de>
Tested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-05 06:02:28 +02:00
..
udc dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
at91_udc.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
at91_udc.h WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -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.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
ci_udc.c global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
ci_udc.h global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
composite.c usb: gadget: missing fallthrough in composite_setup() 2023-04-04 00:33:32 +02: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
dwc2_udc_otg.c usb: gadget: dwc2_udc_otg: implement pullup() 2023-01-14 14:10:30 +01: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 Fix out of bound access of ep array. 2022-09-26 01:49:36 +02:00
ep0.c usb: Remove CONFIG_USBD_HS 2022-12-22 10:31:49 -05: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 arm: Remove PXA architecture support 2022-07-07 09:29:08 -04:00
ether.c usb: gadget: ether: Handle gadget driver registration in probe and remove 2023-08-05 06:02:28 +02:00
f_acm.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
f_dfu.c usb: gadget: dfu: Fix check of transfer direction 2022-12-08 14:30:39 +01: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 usb: gadget: fastboot: detach usb just before rebooting 2023-01-14 14:10:30 +01:00
f_mass_storage.c usb: gadget: f_mass_storage: Rework do_request_sense slightly 2023-04-25 15:31:27 -04:00
f_rockusb.c Remove #include <version.h> from files which do not need it 2021-09-17 12:10:44 -04:00
f_sdp.c usb: gadget: f_sdp: Add missing spl_board_prepare_for_boot() call 2023-04-04 00:34:42 +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
g_dnl.c usb: gadget: dnl: set dnl to be super speed 2021-01-31 14:08:56 +01:00
gadget_chips.h usb: Drop unused fotg210 gadget 2023-02-07 14:33:50 -05:00
Kconfig usb: gadget: Add and use matching SPL USB ethernet gadget Kconfig symbols 2023-05-17 01:51:39 +02:00
Makefile usb: gadget: Add and use matching SPL USB ethernet gadget Kconfig symbols 2023-05-17 01:51:39 +02:00
max3420_udc.c spi: spi-uclass: Add new spi_get_bus_and_cs() implementation 2022-05-23 09:33:10 -04:00
ndis.h USB: Add USB RNDIS gadget protocol 2011-02-19 20:32:37 +01:00
rndis.c Prepare v2023.01-rc4 2022-12-21 13:09:01 -05:00
rndis.h usb: gadget: Remove non-DM_ETH code 2022-12-07 16:04:17 -05:00
storage_common.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
u_os_desc.h usb: gadget: OS Feature Descriptors support 2021-01-31 14:08:56 +01:00
usbstring.c usb: gadget: move utf8_to_utf16le to header file 2021-01-31 14:08:56 +01:00