1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 08:12:06 +02:00

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>
This commit is contained in:
Ye Li
2020-06-29 10:12:59 +08:00
committed by Marek Vasut
parent 213fa47dac
commit 1468a1cc72
3 changed files with 34 additions and 0 deletions

View File

@@ -921,6 +921,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
*