[PATCH 1/2] cmd: bind: Try to improve the (un)bind help

Miquel Raynal miquel.raynal at bootlin.com
Fri Aug 4 21:13:05 CEST 2023


While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
---
 cmd/bind.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/bind.c b/cmd/bind.c
index 4d1b7885e60..8d29a42899e 100644
--- a/cmd/bind.c
+++ b/cmd/bind.c
@@ -243,14 +243,14 @@ static int do_bind_unbind(struct cmd_tbl *cmdtp, int flag, int argc,
 
 U_BOOT_CMD(
 	bind,	4,	0,	do_bind_unbind,
-	"Bind a device to a driver",
+	"Bind a device to a driver, see 'dm tree' for the parameters\n",
 	"<node path> <driver>\n"
 	"bind <class> <index> <driver>\n"
 );
 
 U_BOOT_CMD(
 	unbind,	4,	0,	do_bind_unbind,
-	"Unbind a device from a driver",
+	"Unbind a device from a driver, see 'dm tree' for the parameters\n",
 	"<node path>\n"
 	"unbind <class> <index>\n"
 	"unbind <class> <index> <driver>\n"
-- 
2.34.1



More information about the U-Boot mailing list