diff options
author | Hans Verkuil | 2018-09-08 11:23:14 +0200 |
---|---|---|
committer | Linus Walleij | 2018-09-10 08:54:57 +0200 |
commit | 4e6b823867e2b8afc2b33740ba930e50b1f92421 (patch) | |
tree | 777adeba299de592e1d34355fa362a206fb164da /include/linux/gpio | |
parent | f6d9af4770995d1f58be57139bce7974868231e8 (diff) |
gpiolib: export gpiochip_irq_reqres/relres()
GPIO drivers that do not use GPIOLIB_IRQCHIP can hook these into
the irq_request_resource and irq_release_resource callbacks of the
irq_chip so they correctly 'get' the module and lock the gpio line
for IRQ use.
This will simplify driver code.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r-- | include/linux/gpio/driver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 4a4f410b5285..479f1ccaaebd 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -401,6 +401,8 @@ extern struct gpio_chip *gpiochip_find(void *data, int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset); void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset); bool gpiochip_line_is_irq(struct gpio_chip *chip, unsigned int offset); +int gpiochip_reqres_irq(struct gpio_chip *chip, unsigned int offset); +void gpiochip_relres_irq(struct gpio_chip *chip, unsigned int offset); /* Line status inquiry for drivers */ bool gpiochip_line_is_open_drain(struct gpio_chip *chip, unsigned int offset); |