From d056f5a8fec028cc58c75706f35f2c3daed13e6e Mon Sep 17 00:00:00 2001 From: Jochen Friedrich Date: Thu, 18 Aug 2011 21:51:39 +0100 Subject: ARM: 7026/1: simpad: replace ARM specific LED code Remove the legacy ARM LED code for simpad devices and register a stadard LED platform device using GPIO line instead. Signed-off-by: Jochen Friedrich Signed-off-by: Russell King --- arch/arm/mach-sa1100/simpad.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'arch/arm/mach-sa1100/simpad.c') diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index 9f0eefdaa2a1..34659f354bef 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "generic.h" @@ -294,6 +295,32 @@ static struct platform_device simpad_polled_keys = { }, }; +/* + * GPIO LEDs + */ + +static struct gpio_led simpad_leds[] = { + { + .name = "simpad:power", + .gpio = SIMPAD_CS3_LED2_ON, + .active_low = 0, + .default_trigger = "default-on", + }, +}; + +static struct gpio_led_platform_data simpad_led_data = { + .num_leds = ARRAY_SIZE(simpad_leds), + .leds = simpad_leds, +}; + +static struct platform_device simpad_gpio_leds = { + .name = "leds-gpio", + .id = 0, + .dev = { + .platform_data = &simpad_led_data, + }, +}; + /* * i2c */ @@ -324,6 +351,7 @@ static struct platform_device *devices[] __initdata = { &simpad_keys, &simpad_polled_keys, &simpad_mq200fb, + &simpad_gpio_leds, &simpad_i2c, }; -- cgit v1.2.3