Home
last modified time | relevance | path

Searched hist:"0566 e2403d0b6ba8e2f6df0559ad05e81fc20e35" (Results 1 – 2 of 2) sorted by relevance

/rk3399_rockchip-uboot/drivers/usb/host/
H A Dusb-uclass.c0566e2403d0b6ba8e2f6df0559ad05e81fc20e35 Wed Mar 25 18:22:30 UTC 2015 Simon Glass <sjg@chromium.org> dm: usb: Allow USB drivers to be declared and auto-probed

USB devices in U-Boot are currently probed only after all devices have
been enumerated. Each type of device is probed by custom code, e.g.:

- USB storage
- Keyboard
- Ethernet

With driver model this approach doesn't work very well. We could build
a picture of the bus and then go back and add the devices later, but
this means that the data structures are incomplete for quite a while.
It also does not follow the model of being able to bind a device when we
discover it.

We would prefer to have devices automatically be bound as the device is
enumerated. This allows us to attach drivers to particular USB classes
or product/vendor IDs. This is the method used by Linux.

Add the required #defines from Linux, a way of declaring a USB driver and
the logic to locate the correct driver given the USB device's descriptors.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
/rk3399_rockchip-uboot/include/
H A Dusb.h0566e2403d0b6ba8e2f6df0559ad05e81fc20e35 Wed Mar 25 18:22:30 UTC 2015 Simon Glass <sjg@chromium.org> dm: usb: Allow USB drivers to be declared and auto-probed

USB devices in U-Boot are currently probed only after all devices have
been enumerated. Each type of device is probed by custom code, e.g.:

- USB storage
- Keyboard
- Ethernet

With driver model this approach doesn't work very well. We could build
a picture of the bus and then go back and add the devices later, but
this means that the data structures are incomplete for quite a while.
It also does not follow the model of being able to bind a device when we
discover it.

We would prefer to have devices automatically be bound as the device is
enumerated. This allows us to attach drivers to particular USB classes
or product/vendor IDs. This is the method used by Linux.

Add the required #defines from Linux, a way of declaring a USB driver and
the logic to locate the correct driver given the USB device's descriptors.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>