gpiolib: consolidate GPIO lookups
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 11 Nov 2022 22:19:07 +0000 (14:19 -0800)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 15 Nov 2022 10:21:30 +0000 (11:21 +0100)
commit8eb1f71e7acca4f92cf9cf83030cbb8ec2524025
tree0e5a9fe0bec2a73d0d948e16e4a312d23502b637
parentb7452d670fdef8974e18754342fe6f68e20c2567
gpiolib: consolidate GPIO lookups

Ensure that all paths to obtain/look up GPIOD from generic
consumer-visible APIs go through the new gpiod_find_and_request()
helper, so that we can easily extend it with support for new firmware
mechanisms.

The only exception is OF-specific [devm_]gpiod_get_from_of_node() API
that is still being used by a couple of drivers and will be removed as
soon as patches converting them to use generic fwnode/device APIs are
accepted.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib-acpi.c
drivers/gpio/gpiolib-acpi.h
drivers/gpio/gpiolib.c