diff options
author | Ye Li <ye.li@nxp.com> | 2018-05-11 01:32:39 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2020-04-26 23:23:58 -0700 |
commit | 12ef113d70e8413eb267e15d01dd46470814b132 (patch) | |
tree | 9730261a8e54145f1c83e4bf5d4850accde7c446 /include/usb.h | |
parent | 5462e1c9974b6c4de23ded5c20a61077970a8ce0 (diff) |
MLK-18290-4 usb: ci_udc: Add function to remove usb device
When unregister gadget driver in ci_udc, the usb device is not
removed or stop. This causes next "usb start" fails to work.
Add a new interface "usb_remove_ehci_gadget" in usb-uclass to
remove the usb device for DM driver. Using "usb_lowlevel_stop" for
non-DM driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit c73d137e0a4a613a49f6f63ec63332508afb88c0)
(cherry picked from commit c2f83b46c21e738fa8176a8f83661bf3603067f8)
(cherry picked from commit 3f8718e927c2edf05065e31edf2bb896dcea2de2)
Diffstat (limited to 'include/usb.h')
-rw-r--r-- | include/usb.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/usb.h b/include/usb.h index 22f6088fe66..9d9f5ce267c 100644 --- a/include/usb.h +++ b/include/usb.h @@ -922,6 +922,15 @@ struct ehci_ctrl; int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp); /** + * usb_remove_ehci_gadget() - Remove a gadget USB device + * + * TODO(sjg@chromium.org): Tidy this up when USB gadgets can use driver model + * + * This provides a way to tell a controller to remove a USB device + */ +int usb_remove_ehci_gadget(struct ehci_ctrl **ctlrp); + +/** * usb_stor_reset() - Prepare to scan USB storage devices * * Empty the list of USB storage devices in preparation for scanning them. |