aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/patches-4.4/050-gpio-to-irq.patch
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2016-08-22 02:36:50 +0300
committerJo-Philipp Wich <jo@mein.io>2016-08-23 15:41:27 +0200
commitf046737e92f9a13acbe9139e1ded83287d31eeb5 (patch)
treea99693b42935d5d4ea1addf3514003df4e7898bd /target/linux/gemini/patches-4.4/050-gpio-to-irq.patch
parente58c20aac319e5d9722caed2d64b6338c6b04b85 (diff)
downloadupstream-f046737e92f9a13acbe9139e1ded83287d31eeb5.tar.gz
upstream-f046737e92f9a13acbe9139e1ded83287d31eeb5.tar.bz2
upstream-f046737e92f9a13acbe9139e1ded83287d31eeb5.zip
gemini: add Linux 4.4 support
Signed-off-by: Roman Yeryomin <roman@advem.lv> [Jo-Philipp Wich: change commit title] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'target/linux/gemini/patches-4.4/050-gpio-to-irq.patch')
-rw-r--r--target/linux/gemini/patches-4.4/050-gpio-to-irq.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/gemini/patches-4.4/050-gpio-to-irq.patch b/target/linux/gemini/patches-4.4/050-gpio-to-irq.patch
new file mode 100644
index 0000000000..7572849864
--- /dev/null
+++ b/target/linux/gemini/patches-4.4/050-gpio-to-irq.patch
@@ -0,0 +1,21 @@
+--- 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,
+ };