u-boot/drivers/usb
Hans de Goede 6cda369509 dm: usb: Use device_unbind_children to clean up usb devs on stop
On an usb stop instead of leaving orphan usb devices behind simply remove
them.

The result of this commit is best seen in the output of "dm tree" after
plugging out an usb hub with 2 devices plugges in and plugging in a keyb.
instead, before this commit the output would be:

 usb         [ + ]    `-- sunxi-musb
 usb_hub     [   ]        |-- usb_hub
 usb_mass_st [   ]        |   |-- usb_mass_storage
 usb_dev_gen [   ]        |   `-- generic_bus_0_dev_3
 usb_dev_gen [ + ]        `-- generic_bus_0_dev_1

Notice the non active usb_hub child and its 2 non active children. The
first child being non-active as in this example also causes usb_get_dev_index
to return NULL when probing the first child, which results in the usb kbd
code not binding to the keyboard.

With this commit in place the output after swapping and "usb reset" is:

 usb         [ + ]    `-- sunxi-musb
 usb_dev_gen [ + ]        `-- generic_bus_0_dev_1

As expected, and usb_get_dev_index works properly and the keyboard works.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-07-21 17:39:36 -06:00
..
dwc3 samsung: usb: phy: Support for DWC3 PHY 2015-06-08 15:25:44 +02:00
emul dm: usb: Add a terminator to the string destructor list 2015-04-22 11:13:24 -06:00
eth net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
gadget usb: f_mass_storage: sleep_thread: decrease the interval for check ctrlc() 2015-06-08 15:26:00 +02:00
host dm: usb: Use device_unbind_children to clean up usb devs on stop 2015-07-21 17:39:36 -06:00
musb include: move various macros to include/linux/kernel.h 2014-11-20 11:28:25 -05:00
musb-new usb: Add an usb_device parameter to usb_reset_root_port 2015-07-21 17:39:35 -06:00
phy ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c 2015-04-16 15:08:36 -04:00
ulpi drivers: usb: convert makefiles to Kbuild style 2013-10-31 13:25:38 -04:00
Kconfig dm: usb: sandbox: Add a uclass for USB device emulation 2015-04-18 11:11:26 -06:00