Skip to contentSkip to conversation

GPIO: MIPS: add gpio driver for falcon SoC

PATCH Superseded John Crispin 1 participant 1 message Jul 24, 2012

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 5/6 GPIO: MIPS: add gpio driver for falcon SoC

Add driver for GPIO blocks found on Lantiq FALCON SoC. The SoC has 5 banks of up to 32 pads. The GPIO blocks have a per pin IRQs.

---
Changes in V2
* fix typo in the subject line

 arch/mips/include/asm/mach-lantiq/gpio.h |    4 +
 drivers/gpio/Kconfig                     |    5 +
 drivers/gpio/Makefile                    |    1 +
 drivers/gpio/gpio-falcon.c               |  355 ++++++++++++++++++++++++++++++
 4 files changed, 365 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpio/gpio-falcon.c
arch/mips/include/asm/mach-lantiq/gpio.h +4 -0
index f79505b..fdc8638 100644
@@ -1,10 +1,14 @@
 #ifndef __ASM_MIPS_MACH_LANTIQ_GPIO_H
 #define __ASM_MIPS_MACH_LANTIQ_GPIO_H
 
+#ifndef CONFIG_SOC_FALCON
 static inline int gpio_to_irq(unsigned int gpio)
 {
 	return -1;
 }
+#else
+extern int gpio_to_irq(unsigned int gpio);
+#endif
 
 #define gpio_get_value __gpio_get_value
 #define gpio_set_value __gpio_set_value
drivers/gpio/Kconfig +5 -0
index 502b5ea..f083a8a 100644
@@ -114,6 +114,11 @@ config GPIO_EP93XX
 	depends on ARCH_EP93XX
 	select GPIO_GENERIC
 
+config GPIO_FALCON
+	def_bool y
+	depends on MIPS && SOC_FALCON
+	select GPIO_GENERIC
+
 config GPIO_MM_LANTIQ
 	bool "Lantiq Memory mapped GPIOs"
 	depends on LANTIQ && SOC_XWAY
drivers/gpio/Makefile +1 -0
index d370481..fbf2c51 100644
@@ -20,6 +20,7 @@ obj-$(CONFIG_GPIO_DA9052)	+= gpio-da9052.o
 obj-$(CONFIG_ARCH_DAVINCI)	+= gpio-davinci.o
 obj-$(CONFIG_GPIO_EM)		+= gpio-em.o
 obj-$(CONFIG_GPIO_EP93XX)	+= gpio-ep93xx.o
+obj-$(CONFIG_GPIO_FALCON)	+= gpio-falcon.o
 obj-$(CONFIG_GPIO_GE_FPGA)	+= gpio-ge.o
 obj-$(CONFIG_GPIO_ICH)		+= gpio-ich.o
 obj-$(CONFIG_GPIO_IT8761E)	+= gpio-it8761e.o
drivers/gpio/gpio-falcon.c new file +355 -0

355 lines not on this page · raw message

Signature · 1 line
1.7.9.1