From: Simon Glass <sjg@chromium.org>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
Rob Herring <robh@kernel.org>
Cc: u-boot@lists.denx.de, Andrew Jeffery <andrew@aj.id.au>,
Eddie James <eajames@linux.ibm.com>,
Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH] gpio: allow passing NULL to gpio_request_by_line_name() to search all gpio controllers
Date: Mon, 20 Mar 2023 08:29:11 +1300 [thread overview]
Message-ID: <CAPnjgZ3Le5F9rU+0cA_SspcWTiPGNtR1NJ_-2LNy6aMM3xtbYw@mail.gmail.com> (raw)
In-Reply-To: <256c3461-f08f-75b9-ac2c-38590457d422@prevas.dk>
Hi Rasmus,
On Sun, 19 Mar 2023 at 13:38, Rasmus Villemoes
<rasmus.villemoes@prevas.dk> wrote:
>
> On 18/03/2023 21.20, Simon Glass wrote:
> > Hi Rasmus,
> >
> > On Fri, 17 Mar 2023 at 14:13, Rasmus Villemoes
> > <rasmus.villemoes@prevas.dk> wrote:
> >>
> >> The API is more convenient to use if one doesn't have to know upfront
> >> which gpio controller has a line with the name one is searching for,
> >> and arrange to look that device up somehow. Or implement this loop
> >> oneself.
> >>
> >> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> >> ---
> >> drivers/gpio/gpio-uclass.c | 7 +++++++
> >> include/asm-generic/gpio.h | 3 ++-
> >> 2 files changed, 9 insertions(+), 1 deletion(-)
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> >
> > What is a line name? I don't see any mention of its purpose in the
> > binding doc[1].
>
> Nah, those yaml-files are usually completely useless to gain some
> understanding of what stuff is for, I much preferred the free-form prose.
>
> https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio.txt
> has this text:
>
> Optionally, a GPIO controller may have a "gpio-line-names" property. This is
> an array of strings defining the names of the GPIO lines going out of the
> GPIO controller. This name should be the most meaningful producer name
> for the system, such as a rail name indicating the usage. Package names
> such as pin name are discouraged: such lines have opaque names (since they
> are by definition generic purpose) and such names are usually not very
> helpful. For example "MMC-CD", "Red LED Vdd" and "ethernet reset" are
> reasonable line names as they describe what the line is used for.
OK thank you. I wonder why that is not included in the yaml? There is
a description field, I think.
+Rob Herring who may know
Regards,
Simon
next prev parent reply other threads:[~2023-03-19 19:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 20:12 [PATCH] gpio: allow passing NULL to gpio_request_by_line_name() to search all gpio controllers Rasmus Villemoes
2023-03-18 20:20 ` Simon Glass
2023-03-19 0:38 ` Rasmus Villemoes
2023-03-19 19:29 ` Simon Glass [this message]
2023-03-31 14:16 ` Tom Rini
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=CAPnjgZ3Le5F9rU+0cA_SspcWTiPGNtR1NJ_-2LNy6aMM3xtbYw@mail.gmail.com \
--to=sjg@chromium.org \
--cc=andrew@aj.id.au \
--cc=eajames@linux.ibm.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=robh@kernel.org \
--cc=trini@konsulko.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;
as well as URLs for NNTP newsgroup(s).