summaryrefslogtreecommitdiff
path: root/include/linux/gpio/driver.h
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-09-01 14:29:25 +0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-09-12 11:05:58 +0300
commitfe4fa2e4f7d0722c179fffa25911ea35cafadce2 (patch)
tree791db24e85b7e5d5bb7f367de6b2716fc77451c6 /include/linux/gpio/driver.h
parentd56c6f798afad4e0ce97194ee22cf2745d438bb3 (diff)
downloadlinux-fe4fa2e4f7d0722c179fffa25911ea35cafadce2.tar.xz
gpiolib: make gpiochip_get_desc() public
It makes sense for a GPIO driver to want to get its own descriptor without requesting it. After all, the driver knows that it'll still be valid. Let's move this helper to linux/gpio/driver.h. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio/driver.h')
-rw-r--r--include/linux/gpio/driver.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index b721422f4bfa..8f0859ba7065 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -757,6 +757,8 @@ struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *gc,
enum gpiod_flags dflags);
void gpiochip_free_own_desc(struct gpio_desc *desc);
+struct gpio_desc *gpiochip_get_desc(struct gpio_chip *gc, unsigned int hwnum);
+
#ifdef CONFIG_GPIOLIB
/* lock/unlock as IRQ */