summaryrefslogtreecommitdiff
path: root/arch/arm/mach-kirkwood/sheevaplug-setup.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2009-03-03 09:16:07 +0300
committerNicolas Pitre <nico@cam.org>2009-03-16 05:09:09 +0300
commite96c33d9eddcea86ffd39a592eaca8bb21792002 (patch)
treefcd093a1fbc158801dde13a79e30550dc9087b42 /arch/arm/mach-kirkwood/sheevaplug-setup.c
parent3ec0d47427be9ff5b82ba5c5e853c691a942ed65 (diff)
downloadlinux-e96c33d9eddcea86ffd39a592eaca8bb21792002.tar.xz
[ARM] Kirkwood: SheevaPlug LED support
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-kirkwood/sheevaplug-setup.c')
-rw-r--r--arch/arm/mach-kirkwood/sheevaplug-setup.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c
index c1cb9f4d346c..831e4a56cae1 100644
--- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
+++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
@@ -15,6 +15,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
+#include <linux/leds.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
@@ -73,8 +74,31 @@ static struct mvsdio_platform_data sheevaplug_mvsdio_data = {
// unfortunately the CD signal has not been connected */
};
+static struct gpio_led sheevaplug_led_pins[] = {
+ {
+ .name = "plug:green:health",
+ .default_trigger = "default-on",
+ .gpio = 49,
+ .active_low = 1,
+ },
+};
+
+static struct gpio_led_platform_data sheevaplug_led_data = {
+ .leds = sheevaplug_led_pins,
+ .num_leds = ARRAY_SIZE(sheevaplug_led_pins),
+};
+
+static struct platform_device sheevaplug_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &sheevaplug_led_data,
+ }
+};
+
static unsigned int sheevaplug_mpp_config[] __initdata = {
MPP29_GPIO, /* USB Power Enable */
+ MPP49_GPIO, /* LED */
0
};
@@ -97,6 +121,7 @@ static void __init sheevaplug_init(void)
kirkwood_sdio_init(&sheevaplug_mvsdio_data);
platform_device_register(&sheevaplug_nand_flash);
+ platform_device_register(&sheevaplug_leds);
}
MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")