diff options
author | Nicolas Pitre <nico@cam.org> | 2009-03-03 01:16:07 -0500 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-03-15 22:09:09 -0400 |
commit | e96c33d9eddcea86ffd39a592eaca8bb21792002 (patch) | |
tree | fcd093a1fbc158801dde13a79e30550dc9087b42 /arch/arm/mach-kirkwood/sheevaplug-setup.c | |
parent | 3ec0d47427be9ff5b82ba5c5e853c691a942ed65 (diff) |
[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.c | 25 |
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 @@ | |||
15 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
16 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/leds.h> | ||
18 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
19 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
20 | #include <mach/kirkwood.h> | 21 | #include <mach/kirkwood.h> |
@@ -73,8 +74,31 @@ static struct mvsdio_platform_data sheevaplug_mvsdio_data = { | |||
73 | // unfortunately the CD signal has not been connected */ | 74 | // unfortunately the CD signal has not been connected */ |
74 | }; | 75 | }; |
75 | 76 | ||
77 | static struct gpio_led sheevaplug_led_pins[] = { | ||
78 | { | ||
79 | .name = "plug:green:health", | ||
80 | .default_trigger = "default-on", | ||
81 | .gpio = 49, | ||
82 | .active_low = 1, | ||
83 | }, | ||
84 | }; | ||
85 | |||
86 | static struct gpio_led_platform_data sheevaplug_led_data = { | ||
87 | .leds = sheevaplug_led_pins, | ||
88 | .num_leds = ARRAY_SIZE(sheevaplug_led_pins), | ||
89 | }; | ||
90 | |||
91 | static struct platform_device sheevaplug_leds = { | ||
92 | .name = "leds-gpio", | ||
93 | .id = -1, | ||
94 | .dev = { | ||
95 | .platform_data = &sheevaplug_led_data, | ||
96 | } | ||
97 | }; | ||
98 | |||
76 | static unsigned int sheevaplug_mpp_config[] __initdata = { | 99 | static unsigned int sheevaplug_mpp_config[] __initdata = { |
77 | MPP29_GPIO, /* USB Power Enable */ | 100 | MPP29_GPIO, /* USB Power Enable */ |
101 | MPP49_GPIO, /* LED */ | ||
78 | 0 | 102 | 0 |
79 | }; | 103 | }; |
80 | 104 | ||
@@ -97,6 +121,7 @@ static void __init sheevaplug_init(void) | |||
97 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | 121 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); |
98 | 122 | ||
99 | platform_device_register(&sheevaplug_nand_flash); | 123 | platform_device_register(&sheevaplug_nand_flash); |
124 | platform_device_register(&sheevaplug_leds); | ||
100 | } | 125 | } |
101 | 126 | ||
102 | MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") | 127 | MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") |