u-boot/drivers
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
..
bios_emulator biosemu: Do not free vga_info->BIOSImage when it is 0xc0000 2015-04-29 18:51:49 -06:00
block drivers: block: Remove the ata_piix driver 2015-07-14 18:03:20 -06:00
bootcount qe: move immap_qe.h from arch directory into common directory 2014-07-22 16:25:54 -07:00
clk dm: test: Add tests for the clk uclass 2015-07-21 17:39:30 -06:00
core dm: usb: Document that mixing DM_DEVICE_REMOVE and DM_USB is a bad idea 2015-07-21 17:39:36 -06:00
cpu x86: Move MP initialization codes into a common place 2015-07-14 18:03:16 -06:00
crypto Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2015-03-05 20:50:30 -05:00
ddr driver/ddr/fsl: Add a hook to update SPD address 2015-07-20 11:44:35 -07:00
demo common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
dfu dfu: nand: Verify writes 2015-03-30 23:24:38 -05:00
dma dma: keystone_nav: remove spurious qm_cfg verification 2014-11-06 11:04:39 -05:00
fpga fpga: xilinx: Show fpga info if defined 2015-01-21 10:25:43 +01:00
gpio dm: gpio: Add dm_gpio_request() to manually request a GPIO 2015-07-21 17:39:23 -06:00
hwmon dtt: add ds620 support 2015-04-10 14:23:23 +02:00
i2c exynos: i2c: Correct bug in pinmux selection 2015-07-10 21:13:48 +09:00
input i8042: Add keyboard enable logic in kbd_reset() 2015-04-18 11:11:16 -06:00
led dm: test: Add a test for the LED uclass 2015-07-21 17:39:32 -06:00
memory ARM: keystone: aemif: move aemif driver to drivers/memory/ti-aemif.c 2014-06-19 17:53:58 -04:00
misc dm: test: Add a test for the system controller uclass 2015-07-21 17:39:33 -06:00
mmc dm: test: Add a test for the mmc uclass 2015-07-21 17:39:32 -06:00
mtd mtd: fix false positive "Offset exceeds device limit" error 2015-07-10 09:38:50 -04:00
net driver/ldpaa_eth:Avoid infinite loop in ldpaa_eth_rx 2015-07-20 11:44:37 -07:00
pci armv8/fsl-lsch3: device tree fixups for PCI stream IDs 2015-07-20 11:44:37 -07:00
pcmcia powerpc: mpc824x: remove MPC824X cpu support 2015-01-05 12:08:55 -05:00
power power: pmic: Use trailing_strtol() instead of a local function 2015-07-21 17:39:30 -06:00
pwm pwm: imx: Remove unreachable code 2015-05-26 14:13:12 +02:00
qe QE/DeepSleep: add QE deepsleep support for mpc85xx 2015-04-21 10:19:19 -07:00
ram dm: test: Add a test for the ram uclass 2015-07-21 17:39:32 -06:00
rtc dm: rtc: Support mc146818 driver in driver model 2015-07-14 18:03:16 -06:00
serial ns16550: Improve debug UART so it can work with 32-bit access 2015-07-21 17:39:28 -06:00
soc soc: keystone_serdes: generalize configuration mechanism 2014-10-23 11:27:28 -04:00
sound sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig 2015-04-18 11:11:39 -06:00
spi dm: spi: Make local functions static 2015-07-21 17:39:27 -06:00
thermal thermal: imx_thermal: increase critical temperature threshold 2015-05-26 14:21:25 +02:00
tpm tpm: Support using driver model with I2C 2015-05-14 18:49:33 -06:00
twserial drivers: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00
usb dm: usb: Use device_unbind_children to clean up usb devs on stop 2015-07-21 17:39:36 -06:00
video video: vesa_fb: Look up VGA device by class instead of id 2015-07-14 18:03:18 -06:00
watchdog watchdog/imx_watchdog: do not set WCR_WDW 2015-03-25 16:52:16 +01:00
Kconfig dm: Add a clock uclass 2015-07-21 17:39:29 -06:00
Makefile dm: Add a clock uclass 2015-07-21 17:39:29 -06:00