aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/patches-3.18/050-gpio-to-irq.patch
blob: 18b0abdac68a7021b39a35c835f4ff760e103f10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/arch/arm/mach-gemini/gpio.c	2015-03-01 10:34:52.492113048 +0100
+++ b/arch/arm/mach-gemini/gpio.c	2015-03-01 10:34:59.876498159 +0100
@@ -196,12 +196,18 @@
 	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,
 };