diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-02-20 11:53:31 (GMT) |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-20 11:53:31 (GMT) |
commit | 2307f3aab887bc43e0f262d298977fd9c6b9eee3 (patch) | |
tree | b88eb4b7702053f6aaaabd37ef823d1182a607b5 /include | |
parent | bd203bd56d12401398faa7428c81c1d76c91611e (diff) | |
download | linux-2307f3aab887bc43e0f262d298977fd9c6b9eee3.tar.xz |
Revert "gpio: remove broken irq_to_gpio() interface"
This reverts commit ee2204a37957daed80418ea8ffc4f5c3146fb8e7.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/gpio.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 6fc1c9e..d12b5d5 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h @@ -70,6 +70,11 @@ static inline int gpio_to_irq(unsigned int gpio) return __gpio_to_irq(gpio); } +static inline int irq_to_gpio(unsigned int irq) +{ + return -EINVAL; +} + #endif /* ! CONFIG_ARCH_HAVE_CUSTOM_GPIO_H */ /* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */ @@ -217,6 +222,13 @@ static inline void gpiochip_unlock_as_irq(struct gpio_chip *chip, WARN_ON(1); } +static inline int irq_to_gpio(unsigned irq) +{ + /* irq can never have been returned from gpio_to_irq() */ + WARN_ON(1); + return -EINVAL; +} + static inline int gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, unsigned int gpio_offset, unsigned int pin_offset, |