diff options
author | Jochen Friedrich <jochen@scram.de> | 2011-08-18 21:51:39 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-10-17 09:12:42 +0100 |
commit | d056f5a8fec028cc58c75706f35f2c3daed13e6e (patch) | |
tree | a9338fe9a708cb92616a788372c4b355e4a43feb /arch/arm/mach-sa1100/simpad.c | |
parent | dbd406f9d0a1d33a1303eb75cbe3f9435513d339 (diff) |
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 <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100/simpad.c')
-rw-r--r-- | arch/arm/mach-sa1100/simpad.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index 9f0eefdaa2a..34659f354be 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c @@ -31,6 +31,7 @@ #include <linux/ioport.h> #include <linux/input.h> #include <linux/gpio_keys.h> +#include <linux/leds.h> #include <linux/i2c-gpio.h> #include "generic.h" @@ -295,6 +296,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 */ static struct i2c_gpio_platform_data simpad_i2c_data = { @@ -324,6 +351,7 @@ static struct platform_device *devices[] __initdata = { &simpad_keys, &simpad_polled_keys, &simpad_mq200fb, + &simpad_gpio_leds, &simpad_i2c, }; |