From 423ca7950557104e1565df3efcb6f632002dd35f Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Thu, 24 Sep 2009 19:20:02 +0200 Subject: ARM: gta02: Add LED support The gta02 has three leds which are connected though gpio pins and thus can get supported by using the generic leds-gpio driver. Signed-off-by: Lars-Peter Clausen --- arch/arm/mach-s3c2442/mach-gta02.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c index 0f0c61912e6..f2eeba97bb8 100644 --- a/arch/arm/mach-s3c2442/mach-gta02.c +++ b/arch/arm/mach-s3c2442/mach-gta02.c @@ -60,6 +60,8 @@ #include +#include + #include #include #include @@ -583,6 +585,35 @@ static struct platform_device gta02_buttons_device = { }, }; +/* LEDs */ +static struct gpio_led gta02_gpio_leds[] = { + { + .name = "gta02:orange:power", + .gpio = GTA02_GPIO_PWR_LED1, + }, + { + .name = "gta02:blue:power", + .gpio = GTA02_GPIO_PWR_LED2, + }, + { + .name = "gta02:red:aux", + .gpio = GTA02_GPIO_AUX_LED, + }, +}; + +static struct gpio_led_platform_data gta02_gpio_leds_pdata = { + .leds = gta02_gpio_leds, + .num_leds = ARRAY_SIZE(gta02_gpio_leds), +}; + +static struct platform_device gta02_leds_device = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = >a02_gpio_leds_pdata, + }, +}; + static void __init gta02_map_io(void) { s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc)); @@ -604,6 +635,7 @@ static struct platform_device *gta02_devices[] __initdata = { &s3c_device_iis, &s3c_device_i2c0, >a02_buttons_device, + >a02_leds_device, }; /* These guys DO need to be children of PMU. */ -- cgit v1.2.3