openwrtv3/target/linux/gemini/patches-3.18/050-gpio-to-irq.patch
Jonas Gorski 76d079204d kernel: update 3.18 to 3.18.14
Changelogs:

* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.12
* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.13
* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.14

Build tested on brcm63xx and ipq806x, runtested on brcm63xx.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45711
2015-05-21 19:32:46 +00:00

21 lines
570 B
Diff

--- a/arch/arm/mach-gemini/gpio.c
+++ b/arch/arm/mach-gemini/gpio.c
@@ -196,12 +196,18 @@ static int gemini_gpio_direction_output(
return 0;
}
+static int gemini_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
+{
+ return gpio + GPIO_IRQ_BASE;
+}
+
static struct gpio_chip gemini_gpio_chip = {
.label = "Gemini",
.direction_input = gemini_gpio_direction_input,
.get = gemini_gpio_get,
.direction_output = gemini_gpio_direction_output,
.set = gemini_gpio_set,
+ .to_irq = gemini_gpio_to_irq,
.base = 0,
.ngpio = GPIO_PORT_NUM * 32,
};