"Das U-Boot" Source Tree
at master 98 lines 2.6 kB view raw
1.. SPDX-License-Identifier: GPL-2.0+: 2 3.. index:: 4 single: unbind (command) 5 6unbind command 7============== 8 9Synopsis 10-------- 11 12:: 13 14 unbind <node path> 15 unbind <class> <seq> 16 unbind <class> <seq> <driver> 17 18Description 19----------- 20 21The unbind command is used to unbind a device from a driver. This makes the 22device unavailable in U-Boot. 23 24node path 25 path of the device's device-tree node 26 27class 28 device class name 29 30seq 31 sequence number of the device in the device class 32 33driver 34 device driver name 35 36Example 37------- 38 39Given a system with a real time clock device with device path */pl031@9010000* 40and using driver rtc-pl031 unbinding and binding of the device is demonstrated 41using the three alternative unbind syntaxes. 42 43.. code-block:: 44 45 => dm tree 46 Class Seq Probed Driver Name 47 ----------------------------------------------------------- 48 root 0 [ + ] root_driver root_driver 49 ... 50 rtc 0 [ ] rtc-pl031 |-- pl031@9010000 51 ... 52 => fdt addr $fdtcontroladdr 53 Working FDT set to 7ed7fdb0 54 => fdt print 55 / { 56 interrupt-parent = <0x00008003>; 57 model = "linux,dummy-virt"; 58 #size-cells = <0x00000002>; 59 #address-cells = <0x00000002>; 60 compatible = "linux,dummy-virt"; 61 ... 62 pl031@9010000 { 63 clock-names = "apb_pclk"; 64 clocks = <0x00008000>; 65 interrupts = <0x00000000 0x00000002 0x00000004>; 66 reg = <0x00000000 0x09010000 0x00000000 0x00001000>; 67 compatible = "arm,pl031", "arm,primecell"; 68 }; 69 ... 70 } 71 => unbind /pl031@9010000 72 => dm tree 73 Class Seq Probed Driver Name 74 ----------------------------------------------------------- 75 root 0 [ + ] root_driver root_driver 76 ... 77 => unbind /pl031@9010000 78 Cannot find a device with path /pl031@9010000 79 => bind /pl031@9010000 rtc-pl031 80 => dm tree 81 Class Seq Probed Driver Name 82 ----------------------------------------------------------- 83 root 0 [ + ] root_driver root_driver 84 ... 85 rtc 0 [ ] rtc-pl031 |-- pl031@9010000 86 => unbind rtc 0 87 => bind /pl031@9010000 rtc-pl031 88 => unbind rtc 0 rtc-pl031 89 90Configuration 91------------- 92 93The unbind command is only available if CONFIG_CMD_BIND=y. 94 95Return code 96----------- 97 98The return code $? is 0 (true) on success and 1 (false) on failure.