diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-09-27 16:29:24 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-10-04 13:29:45 +0200 |
commit | d62fcd9f1897d587f8f9db3f77ccae8797a44b5d (patch) | |
tree | c918a5913b767f76dd15c74c5f3ac5730e928018 /include | |
parent | cfe102f63308c8c8e01199a682868a64b83f653e (diff) |
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')
-rw-r--r-- | include/linux/gpio/driver.h | 1 |
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); |