aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Horman <horms+renesas@verge.net.au>2013-07-29 21:59:02 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-08-06 05:18:52 -0400
commit9adad788583c735eb14ddd5cca79a4e2ca2d707c (patch)
tree7aefb110ba580638e8372380f88d6e7fd8319111
parent5c6db1a421c6ceef199a956c7e0c1244ea6dfef7 (diff)
ARM: shmobile: ape6evm: Add GPIO LEDs
The board has 6 LEDs connected to GPIOs. Add a led-gpio device to support them. Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index 677752cc796a..db97460665d5 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -39,6 +39,40 @@
39#include <asm/mach-types.h> 39#include <asm/mach-types.h>
40#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
41 41
42/* LEDS */
43static struct gpio_led ape6evm_leds[] = {
44 {
45 .name = "gnss-en",
46 .gpio = 28,
47 .default_state = LEDS_GPIO_DEFSTATE_OFF,
48 }, {
49 .name = "nfc-nrst",
50 .gpio = 126,
51 .default_state = LEDS_GPIO_DEFSTATE_OFF,
52 }, {
53 .name = "gnss-nrst",
54 .gpio = 132,
55 .default_state = LEDS_GPIO_DEFSTATE_OFF,
56 }, {
57 .name = "bt-wakeup",
58 .gpio = 232,
59 .default_state = LEDS_GPIO_DEFSTATE_OFF,
60 }, {
61 .name = "strobe",
62 .gpio = 250,
63 .default_state = LEDS_GPIO_DEFSTATE_OFF,
64 }, {
65 .name = "bbresetout",
66 .gpio = 288,
67 .default_state = LEDS_GPIO_DEFSTATE_OFF,
68 },
69};
70
71static __initdata struct gpio_led_platform_data ape6evm_leds_pdata = {
72 .leds = ape6evm_leds,
73 .num_leds = ARRAY_SIZE(ape6evm_leds),
74};
75
42/* GPIO KEY */ 76/* GPIO KEY */
43#define GPIO_KEY(c, g, d, ...) \ 77#define GPIO_KEY(c, g, d, ...) \
44 { .code = c, .gpio = g, .desc = d, .active_low = 1 } 78 { .code = c, .gpio = g, .desc = d, .active_low = 1 }
@@ -195,6 +229,9 @@ static void __init ape6evm_add_standard_devices(void)
195 platform_device_register_data(&platform_bus, "gpio-keys", -1, 229 platform_device_register_data(&platform_bus, "gpio-keys", -1,
196 &ape6evm_keys_pdata, 230 &ape6evm_keys_pdata,
197 sizeof(ape6evm_keys_pdata)); 231 sizeof(ape6evm_keys_pdata));
232 platform_device_register_data(&platform_bus, "leds-gpio", -1,
233 &ape6evm_leds_pdata,
234 sizeof(ape6evm_leds_pdata));
198} 235}
199 236
200static const char *ape6evm_boards_compat_dt[] __initdata = { 237static const char *ape6evm_boards_compat_dt[] __initdata = {