summaryrefslogtreecommitdiff
path: root/include/linux/gpio
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-09-05 20:52:55 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-10-13 09:05:57 +0200
commit8c85a102fc4e5c0c942c10677fa43f7a19baa92f (patch)
tree966ed4fa3777ba5e516243a414116a500b2dbede /include/linux/gpio
parent9acdf6209f226846cc1e354a6b3da3c927898926 (diff)
gpiolib: provide gpio_device_get_base()
Let's start adding getters for the opaque struct gpio_device. Start with a function allowing to retrieve the base GPIO number. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r--include/linux/gpio/driver.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index d231c4f31cb4..1d454dc944b3 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -787,6 +787,9 @@ void gpiochip_unlock_as_irq(struct gpio_chip *gc, unsigned int offset);
struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc);
+/* struct gpio_device getters */
+int gpio_device_get_base(struct gpio_device *gdev);
+
#else /* CONFIG_GPIOLIB */
#include <linux/err.h>