From 9b63fcaec664780545318d923063bedd898a629c Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Tue, 10 Oct 2023 11:03:02 +0200 Subject: cmd: Change the dependencies between CMD_BIND and USB_GADGET Today CMD_BIND defaults to 'y' when USB_ETHER is enabled. In practice, CMD_BIND should default to 'y' when any USB gadget is enabled not only USB_ETHER. Let's invert the logic of the dependency and use the weak 'imply' keyword to enforce this. Signed-off-by: Miquel Raynal Reviewed-by: Mattijs Korpershoek Tested-by: Mattijs Korpershoek # on vim3 Link: https://lore.kernel.org/r/20231010090304.49335-2-miquel.raynal@bootlin.com Signed-off-by: Mattijs Korpershoek --- cmd/Kconfig | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd') diff --git a/cmd/Kconfig b/cmd/Kconfig index 6f636155e5b..859e305634b 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -977,7 +977,6 @@ config CMD_BCB config CMD_BIND bool "bind/unbind - Bind or unbind a device to/from a driver" depends on DM - default y if USB_ETHER 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 -- cgit v1.2.3 From 249a75d8e82b422639beedca3d7d945cd78869ba Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Tue, 10 Oct 2023 11:03:03 +0200 Subject: cmd: bind: Try to improve the (un)bind help 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. While we add this message, we can also imply CMD_DM when we enable CMD_BIND so the debug message does not lead to an unknown command. This way the 'dm' command will likely be there unless explicitly disabled. Signed-off-by: Miquel Raynal Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com Signed-off-by: Mattijs Korpershoek --- cmd/Kconfig | 1 + cmd/bind.c | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'cmd') diff --git a/cmd/Kconfig b/cmd/Kconfig index 859e305634b..ac1644282a9 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -977,6 +977,7 @@ config CMD_BCB config CMD_BIND bool "bind/unbind - Bind or unbind a device to/from a driver" depends on DM + imply CMD_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 diff --git a/cmd/bind.c b/cmd/bind.c index 4d1b7885e60..be0d4d2a711 100644 --- a/cmd/bind.c +++ b/cmd/bind.c @@ -246,6 +246,8 @@ U_BOOT_CMD( "Bind a device to a driver", " \n" "bind \n" + "Use 'dm tree' to list all devices registered in the driver model,\n" + "their path, class, index and current driver.\n" ); U_BOOT_CMD( @@ -254,4 +256,6 @@ U_BOOT_CMD( "\n" "unbind \n" "unbind \n" + "Use 'dm tree' to list all devices registered in the driver model,\n" + "their path, class, index and current driver.\n" ); -- cgit v1.2.3