aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-06-16 17:11:49 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-06-23 15:53:10 +0200
commited875bdd1b93eb5b65d63fbd6c2bbdd898b8c385 (patch)
treed1b5aa382c6f0ff6fc47de6cfb4cf4c32508e688
parent68c07fc5fdf34f0926cf06fc0c4ebd6f2f3afe19 (diff)
downloadu-boot-ed875bdd1b93eb5b65d63fbd6c2bbdd898b8c385.zip
u-boot-ed875bdd1b93eb5b65d63fbd6c2bbdd898b8c385.tar.gz
u-boot-ed875bdd1b93eb5b65d63fbd6c2bbdd898b8c385.tar.bz2
doc: unbind man-page
Provide a man-page for the unbind command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r--doc/usage/cmd/unbind.rst95
-rw-r--r--doc/usage/index.rst1
2 files changed, 96 insertions, 0 deletions
diff --git a/doc/usage/cmd/unbind.rst b/doc/usage/cmd/unbind.rst
new file mode 100644
index 0000000..594e4f0
--- /dev/null
+++ b/doc/usage/cmd/unbind.rst
@@ -0,0 +1,95 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+unbind command
+==============
+
+Synopsis
+--------
+
+::
+
+ unbind <node path>
+ unbind <class> <index>
+ unbind <class> <index> <driver>
+
+Description
+-----------
+
+The unbind command is used to unbind a device from a driver. This makes the
+device unavailable in U-Boot.
+
+node path
+ path of the device's device-tree node
+
+class
+ device class name
+
+index
+ index of the device in the device class
+
+driver
+ device driver name
+
+Example
+-------
+
+Given a system with a real time clock device with device path */pl031@9010000*
+and using driver rtc-pl031 unbinding and binding of the device is demonstrated
+using the three alternative unbind syntaxes.
+
+.. code-block::
+
+ => dm tree
+ Class Index Probed Driver Name
+ -----------------------------------------------------------
+ root 0 [ + ] root_driver root_driver
+ ...
+ rtc 0 [ ] rtc-pl031 |-- pl031@9010000
+ ...
+ => fdt addr $fdtcontroladdr
+ Working FDT set to 7ed7fdb0
+ => fdt print
+ / {
+ interrupt-parent = <0x00008003>;
+ model = "linux,dummy-virt";
+ #size-cells = <0x00000002>;
+ #address-cells = <0x00000002>;
+ compatible = "linux,dummy-virt";
+ ...
+ pl031@9010000 {
+ clock-names = "apb_pclk";
+ clocks = <0x00008000>;
+ interrupts = <0x00000000 0x00000002 0x00000004>;
+ reg = <0x00000000 0x09010000 0x00000000 0x00001000>;
+ compatible = "arm,pl031", "arm,primecell";
+ };
+ ...
+ }
+ => unbind /pl031@9010000
+ => dm tree
+ Class Index Probed Driver Name
+ -----------------------------------------------------------
+ root 0 [ + ] root_driver root_driver
+ ...
+ => unbind /pl031@9010000
+ Cannot find a device with path /pl031@9010000
+ => bind /pl031@9010000 rtc-pl031
+ => dm tree
+ Class Index Probed Driver Name
+ -----------------------------------------------------------
+ root 0 [ + ] root_driver root_driver
+ ...
+ rtc 0 [ ] rtc-pl031 |-- pl031@9010000
+ => unbind rtc 0
+ => bind /pl031@9010000 rtc-pl031
+ => unbind rtc 0 rtc-pl031
+
+Configuration
+-------------
+
+The unbind command is only available if CONFIG_CMD_BIND=y.
+
+Return code
+-----------
+
+The return code $? is 0 (true) on success and 1 (false) on failure.
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 54ef89e..9553278 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -97,6 +97,7 @@ Shell commands
cmd/trace
cmd/true
cmd/ums
+ cmd/unbind
cmd/ut
cmd/wdt
cmd/wget