u-boot/drivers/usb
Mattijs Korpershoek fd083842d7 usb: dwc3-meson-g12a: force mode on child add/removal
arch/mach-meson has some custom usb logic, in particular:
* on board_usb_init(), we force USB_DR_MODE_PERIPHERAL
* on board_usb_cleanup(), we force USB_DR_MODE_HOST

With DM_USB_GADGET=y, board_usb_init/cleanup() are no
longer used when we call usb_gadget_initialize().
Instead, the generic (from udc-uclass) initialization/release is
called, which itself calls the controller driver's probe()/remove().

Therefore, enabling DM_USB_GADGET=y will mean that this mode
switching will break.

To prepare for enabling DM_USB_GADGET, perform the mode switching
when the "amlogic,meson-g12a-usb" (dwc2) driver is
probed()/removed() instead.

This is achieved via the glue driver, which gets notified each time one
of its children is probed()/removed.

Note: this change should be harmless without DM_USB_GADGET=y
because the amlogic-g12a-usb driver is not probed via driver model.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20221024-meson-dm-usb-v1-1-2ab077a503b9@baylibre.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-17 09:27:17 +01:00
..
cdns3 usb: cdns3: cdns3-ti: Add compatible for AM64 SoC 2021-11-17 17:09:47 -05:00
common usb: add isp1760 family driver 2022-07-12 21:59:54 +02:00
dwc3 usb: dwc3-meson-g12a: force mode on child add/removal 2023-01-17 09:27:17 +01:00
emul sandbox: check lseek return value in handle_ufi_command 2022-11-22 15:13:35 -07:00
eth usb: eth: Remove non-DM_ETH code 2022-12-07 16:04:17 -05:00
gadget cmd: source: Support specifying config name 2022-12-31 13:35:19 -05:00
host global: Migrate CONFIG_USB_ISP1301_I2C_ADDR to CFG 2022-12-23 10:15:12 -05:00
isp1760 usb: add isp1760 family driver 2022-07-12 21:59:54 +02:00
mtu3 usb: mtu3: flush cache for the first GPD when allocate GPD ring 2021-11-03 08:47:57 +01:00
musb drivers/usb/musb/musb_udc.c: Fix spelling of "mismatch". 2022-01-13 07:57:49 -05:00
musb-new cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
phy rockchip: usb: phy: add rk3066/rk3188 support 2022-06-29 11:28:15 +08:00
ulpi common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
Kconfig usb: Update USB_STORAGE dependencies 2022-12-21 19:04:33 -05:00