aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/gpio
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-09-27 16:29:24 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-10-04 13:29:45 +0200
commitd62fcd9f1897d587f8f9db3f77ccae8797a44b5d (patch)
treec918a5913b767f76dd15c74c5f3ac5730e928018 /include/linux/gpio
parentgpiolib: provide gpio_device_find() (diff)
downloadwireguard-linux-d62fcd9f1897d587f8f9db3f77ccae8797a44b5d.tar.xz
wireguard-linux-d62fcd9f1897d587f8f9db3f77ccae8797a44b5d.zip
gpiolib: provide gpio_device_find_by_label()
By far the most common way of looking up GPIO devices is using their label. Provide a helpers for that to avoid every user implementing their own matching function. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r--include/linux/gpio/driver.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 6ad1f1a8ef2e..24996cba6465 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -610,6 +610,7 @@ struct gpio_chip *gpiochip_find(void *data,
struct gpio_device *gpio_device_find(void *data,
int (*match)(struct gpio_chip *gc, void *data));
+struct gpio_device *gpio_device_find_by_label(const char *label);
struct gpio_device *gpio_device_get(struct gpio_device *gdev);
void gpio_device_put(struct gpio_device *gdev);