提交 2307f3aa 编写于 作者: L Linus Walleij

Revert "gpio: remove broken irq_to_gpio() interface"

This reverts commit ee2204a3.
上级 bd203bd5
...@@ -70,6 +70,11 @@ static inline int gpio_to_irq(unsigned int gpio) ...@@ -70,6 +70,11 @@ static inline int gpio_to_irq(unsigned int gpio)
return __gpio_to_irq(gpio); return __gpio_to_irq(gpio);
} }
static inline int irq_to_gpio(unsigned int irq)
{
return -EINVAL;
}
#endif /* ! CONFIG_ARCH_HAVE_CUSTOM_GPIO_H */ #endif /* ! CONFIG_ARCH_HAVE_CUSTOM_GPIO_H */
/* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */ /* 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, ...@@ -217,6 +222,13 @@ static inline void gpiochip_unlock_as_irq(struct gpio_chip *chip,
WARN_ON(1); 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 static inline int
gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
unsigned int gpio_offset, unsigned int pin_offset, unsigned int gpio_offset, unsigned int pin_offset,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册