Skip to content

Commit

Permalink
ARM: shmobile: Add Koelsch LED6, LED7 and LED8 support
Browse files Browse the repository at this point in the history
Enable Koelsch LEDs for GPIO output testing purpose.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
  • Loading branch information
Magnus Damm authored and Simon Horman committed Dec 10, 2013
1 parent 1a534ec commit 87a2934
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions arch/arm/mach-shmobile/board-koelsch.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,45 @@
*/

#include <linux/kernel.h>
#include <linux/leds.h>
#include <linux/platform_data/gpio-rcar.h>
#include <linux/platform_device.h>
#include <mach/common.h>
#include <mach/r8a7791.h>
#include <mach/rcar-gen2.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>

/* LEDS */
static struct gpio_led koelsch_leds[] = {
{
.name = "led8",
.gpio = RCAR_GP_PIN(2, 21),
.default_state = LEDS_GPIO_DEFSTATE_ON,
}, {
.name = "led7",
.gpio = RCAR_GP_PIN(2, 20),
.default_state = LEDS_GPIO_DEFSTATE_ON,
}, {
.name = "led6",
.gpio = RCAR_GP_PIN(2, 19),
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
};

static const struct gpio_led_platform_data koelsch_leds_pdata __initconst = {
.leds = koelsch_leds,
.num_leds = ARRAY_SIZE(koelsch_leds),
};

static void __init koelsch_add_standard_devices(void)
{
r8a7791_clock_init();
r8a7791_pinmux_init();
r8a7791_add_standard_devices();
platform_device_register_data(&platform_bus, "leds-gpio", -1,
&koelsch_leds_pdata,
sizeof(koelsch_leds_pdata));
}

static const char * const koelsch_boards_compat_dt[] __initconst = {
Expand Down

0 comments on commit 87a2934

Please sign in to comment.