ralink: gpio driver should not set gpio to input when irq is querired
[oweals/openwrt.git] / target / linux / ramips / patches-3.10 / 0023-GPIO-MIPS-ralink-adds-ralink-gpio-support.patch
index e39443ad8264d65c3a3ae22e628284d3d9e9e549..d2bd18c2243b2a90ea1f91817c79e628d06b5317 100644 (file)
@@ -17,11 +17,11 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  create mode 100644 arch/mips/include/asm/mach-ralink/gpio.h
  create mode 100644 drivers/gpio/gpio-ralink.c
 
-diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
-index 7a58ab9..5737c4b 100644
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -443,6 +443,7 @@ config RALINK
+Index: linux-3.10.3/arch/mips/Kconfig
+===================================================================
+--- linux-3.10.3.orig/arch/mips/Kconfig        2013-07-27 10:24:36.376236698 +0200
++++ linux-3.10.3/arch/mips/Kconfig     2013-07-27 11:11:09.804861224 +0200
+@@ -443,6 +443,7 @@
        select SYS_HAS_EARLY_PRINTK
        select HAVE_MACH_CLKDEV
        select CLKDEV_LOOKUP
@@ -29,11 +29,10 @@ index 7a58ab9..5737c4b 100644
  
  config SGI_IP22
        bool "SGI IP22 (Indy/Indigo2)"
-diff --git a/arch/mips/include/asm/mach-ralink/gpio.h b/arch/mips/include/asm/mach-ralink/gpio.h
-new file mode 100644
-index 0000000..f68ee16
---- /dev/null
-+++ b/arch/mips/include/asm/mach-ralink/gpio.h
+Index: linux-3.10.3/arch/mips/include/asm/mach-ralink/gpio.h
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.3/arch/mips/include/asm/mach-ralink/gpio.h      2013-07-27 10:24:40.532236797 +0200
 @@ -0,0 +1,24 @@
 +/*
 + *  Ralink SoC GPIO API support
@@ -59,11 +58,11 @@ index 0000000..f68ee16
 +#define gpio_to_irq   __gpio_to_irq
 +
 +#endif /* __ASM_MACH_RALINK_GPIO_H */
-diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
-index 573c449..4f2f7c2 100644
---- a/drivers/gpio/Kconfig
-+++ b/drivers/gpio/Kconfig
-@@ -209,6 +209,12 @@ config GPIO_RCAR
+Index: linux-3.10.3/drivers/gpio/Kconfig
+===================================================================
+--- linux-3.10.3.orig/drivers/gpio/Kconfig     2013-07-26 00:16:45.000000000 +0200
++++ linux-3.10.3/drivers/gpio/Kconfig  2013-07-27 10:24:40.532236797 +0200
+@@ -209,6 +209,12 @@
        help
          Say yes here to support GPIO on Renesas R-Car SoCs.
  
@@ -76,11 +75,11 @@ index 573c449..4f2f7c2 100644
  config GPIO_SPEAR_SPICS
        bool "ST SPEAr13xx SPI Chip Select as GPIO support"
        depends on PLAT_SPEAR
-diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
-index 0cb2d65..feb9647 100644
---- a/drivers/gpio/Makefile
-+++ b/drivers/gpio/Makefile
-@@ -56,6 +56,7 @@ obj-$(CONFIG_GPIO_PCF857X)   += gpio-pcf857x.o
+Index: linux-3.10.3/drivers/gpio/Makefile
+===================================================================
+--- linux-3.10.3.orig/drivers/gpio/Makefile    2013-07-26 00:16:45.000000000 +0200
++++ linux-3.10.3/drivers/gpio/Makefile 2013-07-27 10:24:40.536236797 +0200
+@@ -56,6 +56,7 @@
  obj-$(CONFIG_GPIO_PCH)                += gpio-pch.o
  obj-$(CONFIG_GPIO_PL061)      += gpio-pl061.o
  obj-$(CONFIG_GPIO_PXA)                += gpio-pxa.o
@@ -88,12 +87,11 @@ index 0cb2d65..feb9647 100644
  obj-$(CONFIG_GPIO_RC5T583)    += gpio-rc5t583.o
  obj-$(CONFIG_GPIO_RDC321X)    += gpio-rdc321x.o
  obj-$(CONFIG_GPIO_RCAR)               += gpio-rcar.o
-diff --git a/drivers/gpio/gpio-ralink.c b/drivers/gpio/gpio-ralink.c
-new file mode 100644
-index 0000000..12984f1
---- /dev/null
-+++ b/drivers/gpio/gpio-ralink.c
-@@ -0,0 +1,326 @@
+Index: linux-3.10.3/drivers/gpio/gpio-ralink.c
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.3/drivers/gpio/gpio-ralink.c    2013-07-27 11:04:07.668851107 +0200
+@@ -0,0 +1,324 @@
 +/*
 + * This program is free software; you can redistribute it and/or modify it
 + * under the terms of the GNU General Public License version 2 as published
@@ -216,8 +214,6 @@ index 0000000..12984f1
 +      if (rg->irq < 1)
 +              return -1;
 +
-+      ralink_gpio_direction_input(chip, pin);
-+
 +      return irq_create_mapping(rg->domain, pin);
 +}
 +
@@ -420,6 +416,3 @@ index 0000000..12984f1
 +}
 +
 +subsys_initcall(ralink_gpio_init);
--- 
-1.7.10.4
-