au1000: convert to gpiolib
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
Signed-off-by Florian Fainelli <[email protected]>
---
arch/mips/au1000/Kconfig +1 -0
@@ -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
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@@ -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