From: Linus Walleij <linus.walleij@linaro.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Jonathan Corbet <corbet@lwn.net>,
Harish Jenny K N <harish_kandiga@mentor.com>,
Eugeniu Rosca <erosca@de.adit-jv.com>,
Alexander Graf <graf@amazon.com>,
Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Phil Reid <preid@electromag.com.au>,
Marc Zyngier <marc.zyngier@arm.com>,
Christoffer Dall <christoffer.dall@arm.com>,
Magnus Damm <magnus.damm@gmail.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v7 3/6] gpiolib: Add support for GPIO lookup by line name
Date: Mon, 18 May 2020 10:20:10 +0200 [thread overview]
Message-ID: <CACRpkdaqSQ4++mhR03pqi0i=uhSyf51WhtE5VOobGNEcMmf09g@mail.gmail.com> (raw)
In-Reply-To: <20200511145257.22970-4-geert+renesas@glider.be>
On Mon, May 11, 2020 at 4:53 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Currently a GPIO lookup table can only refer to a specific GPIO by a
> tuple, consisting of a GPIO controller label and a GPIO offset inside
> the controller.
>
> However, a GPIO may also carry a line name, defined by DT or ACPI.
> If present, the line name is the most use-centric way to refer to a
> GPIO. Hence add support for looking up GPIOs by line name.
> Note that there is no guarantee that GPIO line names are globally
> unique, so this will use the first match found.
>
> Implement this by reusing the existing gpiod_lookup infrastructure.
> Rename gpiod_lookup.chip_label to gpiod_lookup.key, to make it clear
> that this field can have two meanings, and update the kerneldoc and
> GPIO_LOOKUP*() macros.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
> Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> Tested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> ---
> v7:
> - Document non-uniqueness of line names,
> - Rebase on top of commit a0b66a73785ccc8f ("gpio: Rename variable in
This is likely the most controversial patch of this series but since
noone seems to be especially upset, I think I just accept this
heuristic.
It is pretty clearly cut I think, and fits very well with the
aggregator use case, which is an important one.
Yours,
Linus Walleij
next prev parent reply other threads:[~2020-05-18 8:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 14:52 [PATCH v7 0/6] gpio: Add GPIO Aggregator Geert Uytterhoeven
2020-05-11 14:52 ` [PATCH v7 1/6] i2c: i801: Use GPIO_LOOKUP() helper macro Geert Uytterhoeven
2020-05-11 14:52 ` [PATCH v7 2/6] mfd: sm501: Use GPIO_LOOKUP_IDX() " Geert Uytterhoeven
2020-05-11 14:52 ` [PATCH v7 3/6] gpiolib: Add support for GPIO lookup by line name Geert Uytterhoeven
2020-05-18 8:20 ` Linus Walleij [this message]
2020-05-11 14:52 ` [PATCH v7 4/6] gpio: Add GPIO Aggregator Geert Uytterhoeven
2020-05-11 14:52 ` [PATCH v7 5/6] docs: gpio: Add GPIO Aggregator documentation Geert Uytterhoeven
2020-05-11 14:52 ` [PATCH v7 6/6] MAINTAINERS: Add GPIO Aggregator section Geert Uytterhoeven
2020-05-18 8:17 ` [PATCH v7 0/6] gpio: Add GPIO Aggregator Linus Walleij
2020-05-18 9:20 ` Geert Uytterhoeven
2020-05-20 12:14 ` Andy Shevchenko
2020-05-20 12:34 ` Geert Uytterhoeven
2020-05-20 12:40 ` Andy Shevchenko
2020-05-20 12:40 ` Andy Shevchenko
2020-05-20 12:57 ` Geert Uytterhoeven
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='CACRpkdaqSQ4++mhR03pqi0i=uhSyf51WhtE5VOobGNEcMmf09g@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=bgolaszewski@baylibre.com \
--cc=christoffer.dall@arm.com \
--cc=corbet@lwn.net \
--cc=erosca@de.adit-jv.com \
--cc=geert+renesas@glider.be \
--cc=graf@amazon.com \
--cc=harish_kandiga@mentor.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=marc.zyngier@arm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=preid@electromag.com.au \
--cc=qemu-devel@nongnu.org \
/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
all inboxes | Powered by JetHome®