aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-shmobile/board-lager.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 6114edd0a977..6a1ba38fae26 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -21,13 +21,37 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/irqchip.h> 22#include <linux/irqchip.h>
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/leds.h>
24#include <linux/pinctrl/machine.h> 25#include <linux/pinctrl/machine.h>
26#include <linux/platform_data/gpio-rcar.h>
25#include <linux/platform_device.h> 27#include <linux/platform_device.h>
26#include <mach/common.h> 28#include <mach/common.h>
27#include <mach/r8a7790.h> 29#include <mach/r8a7790.h>
28#include <asm/mach-types.h> 30#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
30 32
33/* LEDS */
34static struct gpio_led lager_leds[] = {
35 {
36 .name = "led8",
37 .gpio = RCAR_GP_PIN(5, 17),
38 .default_state = LEDS_GPIO_DEFSTATE_ON,
39 }, {
40 .name = "led7",
41 .gpio = RCAR_GP_PIN(4, 23),
42 .default_state = LEDS_GPIO_DEFSTATE_ON,
43 }, {
44 .name = "led6",
45 .gpio = RCAR_GP_PIN(4, 22),
46 .default_state = LEDS_GPIO_DEFSTATE_ON,
47 },
48};
49
50static struct gpio_led_platform_data lager_leds_pdata = {
51 .leds = lager_leds,
52 .num_leds = ARRAY_SIZE(lager_leds),
53};
54
31static const struct pinctrl_map lager_pinctrl_map[] = { 55static const struct pinctrl_map lager_pinctrl_map[] = {
32 /* SCIF0 (CN19: DEBUG SERIAL0) */ 56 /* SCIF0 (CN19: DEBUG SERIAL0) */
33 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", 57 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
@@ -46,6 +70,9 @@ static void __init lager_add_standard_devices(void)
46 r8a7790_pinmux_init(); 70 r8a7790_pinmux_init();
47 71
48 r8a7790_add_standard_devices(); 72 r8a7790_add_standard_devices();
73 platform_device_register_data(&platform_bus, "leds-gpio", -1,
74 &lager_leds_pdata,
75 sizeof(lager_leds_pdata));
49} 76}
50 77
51static const char *lager_boards_compat_dt[] __initdata = { 78static const char *lager_boards_compat_dt[] __initdata = {