diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-koelsch.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index d099eaf49cf6..2299d658a843 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c | |||
@@ -20,6 +20,8 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/leds.h> | ||
24 | #include <linux/platform_data/gpio-rcar.h> | ||
23 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
24 | #include <mach/common.h> | 26 | #include <mach/common.h> |
25 | #include <mach/r8a7791.h> | 27 | #include <mach/r8a7791.h> |
@@ -27,11 +29,36 @@ | |||
27 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
29 | 31 | ||
32 | /* LEDS */ | ||
33 | static struct gpio_led koelsch_leds[] = { | ||
34 | { | ||
35 | .name = "led8", | ||
36 | .gpio = RCAR_GP_PIN(2, 21), | ||
37 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
38 | }, { | ||
39 | .name = "led7", | ||
40 | .gpio = RCAR_GP_PIN(2, 20), | ||
41 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
42 | }, { | ||
43 | .name = "led6", | ||
44 | .gpio = RCAR_GP_PIN(2, 19), | ||
45 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
46 | }, | ||
47 | }; | ||
48 | |||
49 | static const struct gpio_led_platform_data koelsch_leds_pdata __initconst = { | ||
50 | .leds = koelsch_leds, | ||
51 | .num_leds = ARRAY_SIZE(koelsch_leds), | ||
52 | }; | ||
53 | |||
30 | static void __init koelsch_add_standard_devices(void) | 54 | static void __init koelsch_add_standard_devices(void) |
31 | { | 55 | { |
32 | r8a7791_clock_init(); | 56 | r8a7791_clock_init(); |
33 | r8a7791_pinmux_init(); | 57 | r8a7791_pinmux_init(); |
34 | r8a7791_add_standard_devices(); | 58 | r8a7791_add_standard_devices(); |
59 | platform_device_register_data(&platform_bus, "leds-gpio", -1, | ||
60 | &koelsch_leds_pdata, | ||
61 | sizeof(koelsch_leds_pdata)); | ||
35 | } | 62 | } |
36 | 63 | ||
37 | static const char * const koelsch_boards_compat_dt[] __initconst = { | 64 | static const char * const koelsch_boards_compat_dt[] __initconst = { |