]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: Add bind/unbind commands to bind a device to a driver from the command line
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Thu, 9 Aug 2018 14:17:46 +0000 (16:17 +0200)
committerMarek Vasut <marex@denx.de>
Tue, 21 Aug 2018 14:21:37 +0000 (16:21 +0200)
commita14a63e21b72004b15e5a053627ff8cc674a8c26
treeef85b1152544324b001d49591005a6ecbbd87230
parentabef183f276f6e50fbc790f392ced4557bac9b4c
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>
arch/sandbox/dts/test.dts
cmd/Kconfig
cmd/Makefile
cmd/bind.c [new file with mode: 0644]
configs/sandbox_defconfig
test/py/tests/test_bind.py [new file with mode: 0644]