ARM: S5PV210: Add the GPIO lib
Subsystems (3)
PATCH 2/2 ARM: S5PV210: Add the GPIO lib
This patch add the definition of GPIO to support WM8994 audio codec on I2C bus.
--- arch/arm/mach-s5pv210/include/mach/gpio.h | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
arch/arm/mach-s5pv210/include/mach/gpio.h +8 -2
@@ -52,6 +52,8 @@#define S5PV210_GPIO_MP01_NR (8)#define S5PV210_GPIO_MP02_NR (4)#define S5PV210_GPIO_MP03_NR (8) +#define S5PV210_GPIO_MP04_NR (8) +#define S5PV210_GPIO_MP05_NR (8)/* GPIO bank numbers */
@@ -94,6 +96,8 @@ enum s5p_gpio_number {S5PV210_GPIO_MP01_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_J4 ),S5PV210_GPIO_MP02_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_MP01 ),S5PV210_GPIO_MP03_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_MP02 ), +S5PV210_GPIO_MP04_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_MP03 ), + S5PV210_GPIO_MP05_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP04), };/* S5PV210 GPIO number definitions */
@@ -127,13 +131,15 @@ enum s5p_gpio_number {#define S5PV210_MP01 (_nr) (S5PV210_GPIO_MP01_START + (_nr))#define S5PV210_MP02 (_nr) (S5PV210_GPIO_MP02_START + (_nr))#define S5PV210_MP03 (_nr) (S5PV210_GPIO_MP03_START + (_nr)) +#define S5PV210_MP04 (_nr) (S5PV210_GPIO_MP04_START + (_nr)) +#define S5PV210_MP05 (_nr) (S5PV210_GPIO_MP05_START + (_nr))/* the end of the S5PV210 specific gpios */ -#define S5PV210_GPIO_END (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + 1) +#define S5PV210_GPIO_END (S5PV210_MP05(S5PV210_GPIO_MP05_NR) + 1)#define S3C_GPIO_END S5PV210_GPIO_END/* define the number of gpios we need to the one after the MP03() range */ -#define ARCH_NR_GPIOS (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + \ +#define ARCH_NR_GPIOS (S5PV210_MP05(S5PV210_GPIO_MP05_NR) + \ CONFIG_SAMSUNG_GPIO_EXTRA + 1)#include <asm-generic/gpio.h>
Hello,
Quoted 2 lines · Chanwoo Choi
This patch add the definition of GPIO to support WM8994 audio codec on I2C bus.
I've already submitted similar patch that does this job correctly. See:
http://git.kernel.org/?p=linux/kernel/git/kgene/linux-samsung.git;a=commit;h=d67d303c159aca6db11fb9a03068f52cbf7c145d
Quoted 33 lines
Signed-off-by Chanwoo Choi <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/mach-s5pv210/include/mach/gpio.h | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/gpio.h +0
-0
s5pv210/include/mach/gpio.h
index d6461ba..33a9867 100644arch/arm/mach-s5pv210/include/mach/gpio.h +4
-0@@ -52,6 +52,8 @@#define S5PV210_GPIO_MP01_NR (8)#define S5PV210_GPIO_MP02_NR (4)#define S5PV210_GPIO_MP03_NR (8) +#define S5PV210_GPIO_MP04_NR (8) +#define S5PV210_GPIO_MP05_NR (8)/* GPIO bank numbers */ @@ -94,6 +96,8 @@ enum s5p_gpio_number {S5PV210_GPIO_MP01_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_J4 ),S5PV210_GPIO_MP02_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_MP01 ),S5PV210_GPIO_MP03_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_MP02 ), +S5PV210_GPIO_MP04_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_MP03 ), + S5PV210_GPIO_MP05_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP04), };/* S5PV210 GPIO number definitions */ @@ -127,13 +131,15 @@ enum s5p_gpio_number {#define S5PV210_MP01 (_nr) (S5PV210_GPIO_MP01_START + (_nr))#define S5PV210_MP02 (_nr) (S5PV210_GPIO_MP02_START + (_nr))#define S5PV210_MP03 (_nr) (S5PV210_GPIO_MP03_START + (_nr))
arch/arm/mach-s5pv210/include/mach/gpio.h enum s5p_gpio_number { · line 136
Quoted 10 lines
arch/arm/mach-s5pv210/include/mach/gpio.h +3
-2+#define S5PV210_MP04 (_nr) (S5PV210_GPIO_MP04_START + (_nr)) +#define S5PV210_MP05 (_nr) (S5PV210_GPIO_MP05_START + (_nr))/* the end of the S5PV210 specific gpios */ -#define S5PV210_GPIO_END (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + 1) +#define S5PV210_GPIO_END (S5PV210_MP05(S5PV210_GPIO_MP05_NR) + 1)#define S3C_GPIO_END S5PV210_GPIO_END/* define the number of gpios we need to the one after the MP03() range */ -#define ARCH_NR_GPIOS (S5PV210_MP03(S5PV210_GPIO_MP03_NR) +
\
arch/arm/mach-s5pv210/include/mach/gpio.h enum s5p_gpio_number { · line 142
Quoted 1 line
arch/arm/mach-s5pv210/include/mach/gpio.h +1
-0+#define ARCH_NR_GPIOS (S5PV210_MP05(S5PV210_GPIO_MP05_NR) +
\
arch/arm/mach-s5pv210/include/mach/gpio.h enum s5p_gpio_number { · line 145
Quoted 4 lines
arch/arm/mach-s5pv210/include/mach/gpio.h +0
-0CONFIG_SAMSUNG_GPIO_EXTRA + 1)#include <asm-generic/gpio.h>
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
Quoted 11 lines · Marek Szyprowski
Hello,
Quoted 2 lines · Chanwoo Choi
This patch add the definition of GPIO to support WM8994 audio codec on I2C bus.
I've already submitted similar patch that does this job correctly. See:
http://git.kernel.org/?p=linux/kernel/git/kgene/linux-samsung.git;a=commit;h=d67d303c159aca6db11fb9a03068f52cbf7c145d
Ah~, I haven't checked your patch.
I will only send the patch which support audio on Goni/Aquila board.
Quoted 5 lines · Chanwoo Choi
This patch add the definition of GPIO to support WM8994 audio codec on I2C bus.
Signed-off-by Chanwoo Choi <[email protected]>Signed-off-by Kyungmin Park <[email protected]>
This should come before the patch using it in your patch series, that way things won't break when people do git bisect and try to build the first patch without the second. The changelog could also do with a bit of a cleanup - this isn't something that's specific to a particular board, it's adding support for the GPIOs for whatever function they are needed on any board using this processor.