qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 3/6] gpiolib: Add support for GPIO lookup by line name


From: Linus Walleij
Subject: Re: [PATCH v7 3/6] gpiolib: Add support for GPIO lookup by line name
Date: Mon, 18 May 2020 10:20:10 +0200

On Mon, May 11, 2020 at 4:53 PM Geert Uytterhoeven
<address@hidden> 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 <address@hidden>
> Reviewed-by: Ulrich Hecht <address@hidden>
> Reviewed-by: Eugeniu Rosca <address@hidden>
> Tested-by: Eugeniu Rosca <address@hidden>
> ---
> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]