diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2013-05-13 13:07:24 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-06-11 18:47:19 -0400 |
commit | ba18ec214e4a8a45a164bbb4b2a8af401dd5b408 (patch) | |
tree | c3536ac6f80b0ec582d4dfc896cc3a9240f56120 /arch/arm/mach-clps711x/board-autcpu12.c | |
parent | 2a6f06141533fc48dc4077b0b4a9e722c1b72711 (diff) |
ARM: clps711x: autcpu12: Move LCD DPOT definitions to board file
We do not have driver for Up/Down digital potentiometer (DPOT), so
just define pins as GPIOs and export these pins to user.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-clps711x/board-autcpu12.c')
-rw-r--r-- | arch/arm/mach-clps711x/board-autcpu12.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c index 1e22cb4726be..78b528aa3ba7 100644 --- a/arch/arm/mach-clps711x/board-autcpu12.c +++ b/arch/arm/mach-clps711x/board-autcpu12.c | |||
@@ -51,12 +51,18 @@ | |||
51 | #define AUTCPU12_SMC_BASE (CS1_PHYS_BASE + 0x06000000) | 51 | #define AUTCPU12_SMC_BASE (CS1_PHYS_BASE + 0x06000000) |
52 | #define AUTCPU12_SMC_SEL_BASE (AUTCPU12_SMC_BASE + 0x10) | 52 | #define AUTCPU12_SMC_SEL_BASE (AUTCPU12_SMC_BASE + 0x10) |
53 | 53 | ||
54 | /* NAND flash */ | ||
54 | #define AUTCPU12_MMGPIO_BASE (CLPS711X_NR_GPIO) | 55 | #define AUTCPU12_MMGPIO_BASE (CLPS711X_NR_GPIO) |
55 | #define AUTCPU12_SMC_NCE (AUTCPU12_MMGPIO_BASE + 0) /* Bit 0 */ | 56 | #define AUTCPU12_SMC_NCE (AUTCPU12_MMGPIO_BASE + 0) /* Bit 0 */ |
56 | #define AUTCPU12_SMC_RDY CLPS711X_GPIO(1, 2) | 57 | #define AUTCPU12_SMC_RDY CLPS711X_GPIO(1, 2) |
57 | #define AUTCPU12_SMC_ALE CLPS711X_GPIO(1, 3) | 58 | #define AUTCPU12_SMC_ALE CLPS711X_GPIO(1, 3) |
58 | #define AUTCPU12_SMC_CLE CLPS711X_GPIO(1, 3) | 59 | #define AUTCPU12_SMC_CLE CLPS711X_GPIO(1, 3) |
59 | 60 | ||
61 | /* LCD contrast digital potentiometer */ | ||
62 | #define AUTCPU12_DPOT_CS CLPS711X_GPIO(4, 0) | ||
63 | #define AUTCPU12_DPOT_CLK CLPS711X_GPIO(4, 1) | ||
64 | #define AUTCPU12_DPOT_UD CLPS711X_GPIO(4, 2) | ||
65 | |||
60 | static struct resource autcpu12_cs8900_resource[] __initdata = { | 66 | static struct resource autcpu12_cs8900_resource[] __initdata = { |
61 | DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K), | 67 | DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K), |
62 | DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ), | 68 | DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ), |
@@ -148,6 +154,12 @@ static struct platform_device autcpu12_mmgpio_pdev __initdata = { | |||
148 | }, | 154 | }, |
149 | }; | 155 | }; |
150 | 156 | ||
157 | static const struct gpio autcpu12_gpios[] __initconst = { | ||
158 | { AUTCPU12_DPOT_CS, GPIOF_OUT_INIT_HIGH, "DPOT CS" }, | ||
159 | { AUTCPU12_DPOT_CLK, GPIOF_OUT_INIT_LOW, "DPOT CLK" }, | ||
160 | { AUTCPU12_DPOT_UD, GPIOF_OUT_INIT_LOW, "DPOT UD" }, | ||
161 | }; | ||
162 | |||
151 | static void __init autcpu12_init(void) | 163 | static void __init autcpu12_init(void) |
152 | { | 164 | { |
153 | clps711x_devices_init(); | 165 | clps711x_devices_init(); |
@@ -160,6 +172,8 @@ static void __init autcpu12_init(void) | |||
160 | 172 | ||
161 | static void __init autcpu12_init_late(void) | 173 | static void __init autcpu12_init_late(void) |
162 | { | 174 | { |
175 | gpio_request_array(autcpu12_gpios, ARRAY_SIZE(autcpu12_gpios)); | ||
176 | |||
163 | if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) { | 177 | if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) { |
164 | /* We are need both drivers to handle NAND */ | 178 | /* We are need both drivers to handle NAND */ |
165 | platform_device_register(&autcpu12_nand_pdev); | 179 | platform_device_register(&autcpu12_nand_pdev); |