[U-Boot] [PATCH 0/5] RFC: usb: Drop requirement for USB unbinding

Simon Glass sjg at chromium.org
Tue Sep 8 19:15:07 CEST 2015


There was quite a bit of discussion about the change that required the
unbinding of USB devices for the subsystem to function correctly. E.g.

https://patchwork.ozlabs.org/patch/485637/

The key issue is the usb_get_dev_index() function which is not a good API
for driver model. We can drop use of this function once everything is
converted to driver model. Then I believe the problems raised by Hans go
away. For now we can add a deprecation warning on the function.

It is easy to convert USB keyboards to driver model. This series includes
a patch for that.

This series also includes reverts for the three commits which as discussed
I would like to drop. U-Boot should be able to run normally and exit without
unbinding anything.

I cannot actually repeat the problem that Hans mentions in the above thread
so I may be missing a step. Hans, any ideas on this?


Simon Glass (5):
  Revert "dm: usb: Rename usb_find_child to usb_find_emul_child"
  Revert "dm: usb: Use device_unbind_children to clean up usb devs on
    stop"
  Revert "dm: Export device_remove_children / device_unbind_children"
  dm: usb: Add support for USB keyboards with driver model
  dm: usb: Deprecate usb_get_dev_index()

 common/cmd_usb.c              | 12 +++++-----
 common/usb_kbd.c              | 52 +++++++++++++++++++++++++++++++++++++++++--
 drivers/core/device-remove.c  | 22 ++++++++++++++----
 drivers/usb/host/usb-uclass.c | 31 ++++++++++++++++----------
 include/dm/device-internal.h  | 26 ----------------------
 include/dm/uclass-id.h        |  1 +
 6 files changed, 94 insertions(+), 50 deletions(-)

-- 
2.5.0.457.gab17608



More information about the U-Boot mailing list