cmd: Add bind/unbind commands to bind a device to a driver from the command line
In some cases it can be useful to be able to bind a device to a driver from
the command line.
The obvious example is for versatile devices such as USB gadget.
Another use case is when the devices are not yet ready at startup and
require some setup before the drivers are bound (ex: FPGA which bitsream is
fetched from a mass storage or ethernet)
usage example:
bind usb_dev_generic 0 usb_ether
unbind usb_dev_generic 0 usb_ether
or
unbind eth 1
bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether
unbind /ocp/omap_dwc3@48380000/usb@48390000
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
diff --git a/cmd/Kconfig b/cmd/Kconfig
index d5abcfd..b667df8 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -607,6 +607,15 @@
Shows ADC device info and permit printing one-shot analog converted
data from a named Analog to Digital Converter.
+config CMD_BIND
+ bool "bind/unbind - Bind or unbind a device to/from a driver"
+ depends on DM
+ help
+ Bind or unbind a device to/from a driver from the command line.
+ This is useful in situations where a device may be handled by several
+ drivers. For example, this can be used to bind a UDC to the usb ether
+ gadget driver from the command line.
+
config CMD_CLK
bool "clk - Show clock frequencies"
help