diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-kota2.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c index 849423cddca9..d46bd9f7cea5 100644 --- a/arch/arm/mach-shmobile/board-kota2.c +++ b/arch/arm/mach-shmobile/board-kota2.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/input.h> | 32 | #include <linux/input.h> |
33 | #include <linux/input/sh_keysc.h> | 33 | #include <linux/input/sh_keysc.h> |
34 | #include <linux/gpio_keys.h> | 34 | #include <linux/gpio_keys.h> |
35 | #include <linux/leds.h> | ||
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
36 | #include <mach/sh73a0.h> | 37 | #include <mach/sh73a0.h> |
37 | #include <mach/common.h> | 38 | #include <mach/common.h> |
@@ -145,10 +146,36 @@ static struct platform_device gpio_keys_device = { | |||
145 | }, | 146 | }, |
146 | }; | 147 | }; |
147 | 148 | ||
149 | #define GPIO_LED(n, g) { .name = n, .gpio = g } | ||
150 | |||
151 | static struct gpio_led gpio_leds[] = { | ||
152 | GPIO_LED("V2513", GPIO_PORT153), /* PORT153 [TPU1T02] -> V2513 */ | ||
153 | GPIO_LED("V2514", GPIO_PORT199), /* PORT199 [TPU4TO1] -> V2514 */ | ||
154 | GPIO_LED("V2515", GPIO_PORT197), /* PORT197 [TPU2TO1] -> V2515 */ | ||
155 | GPIO_LED("KEYLED", GPIO_PORT163), /* PORT163 [TPU3TO0] -> KEYLED */ | ||
156 | GPIO_LED("G", GPIO_PORT20), /* PORT20 [GPO0] -> LED7 -> "G" */ | ||
157 | GPIO_LED("H", GPIO_PORT21), /* PORT21 [GPO1] -> LED8 -> "H" */ | ||
158 | GPIO_LED("J", GPIO_PORT22), /* PORT22 [GPO2] -> LED9 -> "J" */ | ||
159 | }; | ||
160 | |||
161 | static struct gpio_led_platform_data gpio_leds_info = { | ||
162 | .leds = gpio_leds, | ||
163 | .num_leds = ARRAY_SIZE(gpio_leds), | ||
164 | }; | ||
165 | |||
166 | static struct platform_device gpio_leds_device = { | ||
167 | .name = "leds-gpio", | ||
168 | .id = -1, | ||
169 | .dev = { | ||
170 | .platform_data = &gpio_leds_info, | ||
171 | }, | ||
172 | }; | ||
173 | |||
148 | static struct platform_device *kota2_devices[] __initdata = { | 174 | static struct platform_device *kota2_devices[] __initdata = { |
149 | ð_device, | 175 | ð_device, |
150 | &keysc_device, | 176 | &keysc_device, |
151 | &gpio_keys_device, | 177 | &gpio_keys_device, |
178 | &gpio_leds_device, | ||
152 | }; | 179 | }; |
153 | 180 | ||
154 | static struct map_desc kota2_io_desc[] __initdata = { | 181 | static struct map_desc kota2_io_desc[] __initdata = { |