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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user