Thread (20 messages) 20 messages, 5 authors, 2020-03-17

Re: [PATCH v5 2/5] gpiolib: Add support for GPIO line table lookup

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2020-03-17 08:48:21
Also in: linux-gpio, linux-renesas-soc, lkml, qemu-devel

Hi Linus,

On Thu, Mar 12, 2020 at 3:21 PM Linus Walleij [off-list ref] wrote:
On Tue, Feb 18, 2020 at 4:18 PM Geert Uytterhoeven
[off-list ref] wrote:
quoted
Currently GPIOs can only be referred to by GPIO controller and offset in
GPIO lookup tables.

Add support for looking them up by line name.
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 <redacted>
Reviewed-by: Eugeniu Rosca <redacted>
Tested-by: Eugeniu Rosca <redacted>
I will try to understand why this change is necessary to implement
the gpio aggregator (probablt I will comment that on the other
patches like "aha now I see it" or so, but it would help a lot if the
commit message
would state the technical reason to why we need to do this change,
like what it is that you want to do and why you cannot do it without
this change.
It's very simple: how do you want the user to refer to a specific GPIO
line? Currently he can only do so by gpiochip label and index.
However, there exists another stable reference: the (optional) line name,
which can be attached using "gpio-line-names" in DT or ACPI.
As this is the most use-centric way to refer to a GPIO, it makes sense
to support lookup based on that, too.

Will reword to make this clearer.


Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help