public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Marek Vasut <marex@denx.de>
Cc: Lukasz Majewski <lukma@denx.de>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH RESEND v2 1/2] cmd: bind: Try to improve the (un)bind help
Date: Thu, 5 Oct 2023 17:54:43 +0200	[thread overview]
Message-ID: <20231005175443.7d042e8b@xps-13> (raw)
In-Reply-To: <b812e5e2-aa29-4802-99cc-72f2e83595de@denx.de>

Hi Marek,

marex@denx.de wrote on Thu, 5 Oct 2023 15:01:51 +0200:

> On 10/2/23 15:46, Miquel Raynal wrote:
> > 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@bootlin.com>
> > ---
> > Resend: no change.
> > 
> > Changes in v2:
> > * Moved the details in the long text section as suggested by Heinrich.
> > * Rephrased the help text as well, not fully following Heinrich
> >    suggestion, but taking inspiration from it.
> > ---
> >   cmd/bind.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> > 
> > 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",
> >   	"<node path> <driver>\n"
> >   	"bind <class> <index> <driver>\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(
> >   	"<node path>\n"
> >   	"unbind <class> <index>\n"
> >   	"unbind <class> <index> <driver>\n"
> > +	"Use 'dm tree' to list all devices registered in the driver model,\n"
> > +	"their path, class, index and current driver.\n"  
> 
> 'dm tree' depends on CMD_DM , you might need some if (IS_ENABLED()) here.

Well, no, and that's my point actually. People need to know that this
command exist and should be used for this purpose. If you only tell
them "use 'dm tree'" conditionally, you loose part of the audience:
people not aware of this command or its usefulness.

Thanks,
Miquèl

  reply	other threads:[~2023-10-05 15:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 13:46 [PATCH RESEND v2 1/2] cmd: bind: Try to improve the (un)bind help Miquel Raynal
2023-10-02 13:46 ` [PATCH RESEND v2 2/2] usb: udc: Try to clarify an error message Miquel Raynal
2023-10-02 14:37   ` Massimo Pegorer
2023-10-02 15:01     ` Miquel Raynal
2023-10-05 12:33   ` Mattijs Korpershoek
2023-10-05 13:04   ` Marek Vasut
2023-10-05 15:51     ` Miquel Raynal
2023-10-07 21:09       ` Marek Vasut
2023-10-10  8:34         ` Miquel Raynal
2023-10-02 18:56 ` [PATCH RESEND v2 1/2] cmd: bind: Try to improve the (un)bind help Simon Glass
2023-10-05 12:30 ` Mattijs Korpershoek
2023-10-05 13:01 ` Marek Vasut
2023-10-05 15:54   ` Miquel Raynal [this message]
2023-10-07 21:03     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231005175443.7d042e8b@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=mkorpershoek@baylibre.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox