diff options
| author | Neil Armstrong <[email protected]> | 2023-01-17 10:11:45 +0100 |
|---|---|---|
| committer | Neil Armstrong <[email protected]> | 2023-01-20 16:21:31 +0100 |
| commit | 043a9674b64741e02b99e9c5ad2e4ee5a1c841d5 (patch) | |
| tree | b8450f8e2d5d868c90a5c29417d40196cb2df254 /scripts/objdiff | |
| parent | b96640cbfb319071aea7915cfa2f7aefe08bbc08 (diff) | |
usb: dwc3-meson-gxl: 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.
Thanks for Mattijs for the original work at [1].
[1] https://lore.kernel.org/all/[email protected]/
Reviewed-by: Mattijs Korpershoek <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
