2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00
linux-next/Documentation/driver-api/gpio
Geert Uytterhoeven 4c033b5499 gpiolib: Add support for GPIO lookup by line name
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>
Tested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Link: https://lore.kernel.org/r/20200511145257.22970-4-geert+renesas@glider.be
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2020-05-18 10:12:42 +02:00
..
board.rst gpiolib: Add support for GPIO lookup by line name 2020-05-18 10:12:42 +02:00
bt8xxgpio.rst docs: driver-api: bt8xxgpio: Revive dead link 2019-10-09 11:13:36 +02:00
consumer.rst It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
driver.rst docs: gpio: driver.rst: don't mark literal blocks twice 2020-03-25 09:50:44 +01:00
drivers-on-gpio.rst gpio: Add use guidance documentation 2020-01-15 11:11:43 +01:00
index.rst gpio: Add use guidance documentation 2020-01-15 11:11:43 +01:00
intro.rst Documentation: gpio: Move introduction to driver-api 2018-03-23 04:20:30 +01:00
legacy.rst Documentation: gpio: legacy: Don't use POLLERR for poll(2) 2019-02-20 10:53:52 +01:00
using-gpio.rst gpio: Add use guidance documentation 2020-01-15 11:11:43 +01:00