diff options
author | Ye Li <ye.li@nxp.com> | 2020-06-29 10:12:59 +0800 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2020-09-01 14:47:43 +0200 |
commit | 1468a1cc72afa210c35a4d0ed533de29110de648 (patch) | |
tree | 26c987450664ce86a785e1a0143c47777a63f984 /include | |
parent | 213fa47dacf07d11f094ff58a5695cd0c425e164 (diff) |
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>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'include')
-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 fa9e09607e..5a7af882fb 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. |