gemini: add Linux 4.4 support
[openwrt/staging/yousong.git] / target / linux / gemini / patches-4.1 / 050-gpio-to-irq.patch
1 --- a/arch/arm/mach-gemini/gpio.c
2 +++ b/arch/arm/mach-gemini/gpio.c
3 @@ -196,12 +196,18 @@ static int gemini_gpio_direction_output(
4 return 0;
5 }
6
7 +static int gemini_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
8 +{
9 + return gpio + GPIO_IRQ_BASE;
10 +}
11 +
12 static struct gpio_chip gemini_gpio_chip = {
13 .label = "Gemini",
14 .direction_input = gemini_gpio_direction_input,
15 .get = gemini_gpio_get,
16 .direction_output = gemini_gpio_direction_output,
17 .set = gemini_gpio_set,
18 + .to_irq = gemini_gpio_to_irq,
19 .base = 0,
20 .ngpio = GPIO_PORT_NUM * 32,
21 };