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>
This commit is contained in:
Jochen Friedrich
2011-08-18 21:51:39 +01:00
committed by Russell King
parent dbd406f9d0
commit d056f5a8fe
5 changed files with 28 additions and 101 deletions

View File

@@ -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"
@@ -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,
};