Skip to contentSkip to conversation

au1000: convert to gpiolib

PATCH In review Florian Fainelli 2 participants 2 messages Aug 23, 2008 – Aug 26, 2008 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 au1000: convert to gpiolib

This patch converts Au1000 to use gpiolib. Testers welcome !

Manuel, Kevin, could you test this on your boards ? Thanks

---

arch/mips/au1000/Kconfig +1 -0
index e4a057d..e4f257f 100644
@@ -134,3 +134,4 @@ config SOC_AU1X00
 	select SYS_HAS_CPU_MIPS32_R1
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_APM_EMULATION
+	select ARCH_REQUIRE_GPIOLIB
arch/mips/au1000/common/gpio.c +149 -75

274 lines not on this page · raw message

include/asm-mips/mach-au1x00/gpio.h +11 -56

78 lines not on this page · raw message

#1 lore raw

Hello Florian,

Quoted 4 lines · Florian Fainelli

This patch converts Au1000 to use gpiolib. Testers welcome !

Manuel, Kevin, could you test this on your boards ? Thanks

No problems on my end.

arch/mips/au1000/common/gpio.c line 2

Quoted 8 lines
arch/mips/au1000/common/gpio.c +1 -1
index b485d94..67b3a6b 100644
@@ -1,5 +1,5 @@
 
-int au1xxx_gpio_direction_output(unsigned gpio, int value)
+int __init au1000_gpio_init(void)

make that one static please.

Quoted 7 lines
arch/mips/au1000/common/gpio.c +0 -6
 {
-	if (gpio >= AU1XXX_GPIO_BASE)
-#if defined(CONFIG_SOC_AU1000)
-		return -ENODEV;
-#else
-		return au1xxx_gpio2_direction_output(gpio, value);
-#endif

arch/mips/au1000/common/gpio.c line 220

Quoted 10 lines
arch/mips/au1000/common/gpio.c +6 -3
-
-	return au1xxx_gpio1_direction_output(gpio, value);
+	gpiochip_add(&au1000_gpio_chip[0].chip);
+#if !defined(CONFIG_SOC_AU1000)
+	gpiochip_add(&au1000_gpio_chip[1].chip);
+#endif	
+	return 0;
 }
-EXPORT_SYMBOL(au1xxx_gpio_direction_output);
+arch_initcall(au1000_gpio_init);

Thanks,
Manuel Lauss