summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRicardo Salveti de Araujo <ricardo.salveti@canonical.com>2010-08-30 15:58:15 -0500
committerSebastien Jan <s-jan@ti.com>2010-09-01 18:20:40 +0200
commit02fd62b3ff26889d784b6a647fa0e831380b5dc5 (patch)
tree103cf4aeae2b9dfd7082b481c324077f6b883f49 /arch
parent0e177add0b3e331d54ea26398bfca2792a46d097 (diff)
OMAP4: board-omap4panda.c: adding leds status1 and status2
At Pandaboard we have 2 status leds, so adding them with similar usage as we have for Beagleboard (heartbeat and mmc0). Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index ac78229327de..b4a464145e11 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -20,6 +20,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/io.h>
+#include <linux/leds.h>
#include <linux/gpio.h>
#include <linux/usb/otg.h>
#include <linux/i2c/twl.h>
@@ -74,6 +75,32 @@ struct platform_device *st_get_plat_device(void)
}
EXPORT_SYMBOL(st_get_plat_device);
+static struct gpio_led gpio_leds[] = {
+ {
+ .name = "pandaboard::status1",
+ .default_trigger = "heartbeat",
+ .gpio = 7,
+ },
+ {
+ .name = "pandaboard::status2",
+ .default_trigger = "mmc0",
+ .gpio = 8,
+ },
+};
+
+static struct gpio_led_platform_data gpio_led_info = {
+ .leds = gpio_leds,
+ .num_leds = ARRAY_SIZE(gpio_leds),
+};
+
+static struct platform_device leds_gpio = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &gpio_led_info,
+ },
+};
+
#ifdef CONFIG_OMAP2_DSS_HDMI
static struct platform_device sdp4430_hdmi_audio_device = {
.name = "hdmi-dai",
@@ -128,6 +155,7 @@ static struct omap_dss_board_info panda_dss_data = {
};
static struct platform_device *panda_devices[] __initdata = {
+ &leds_gpio,
&sdp4430_hdmi_audio_device,
&wl127x_device
};
@@ -144,6 +172,7 @@ static void __init omap4_display_init(void)
#else
static struct platform_device *panda_devices[] __initdata = {
+ &leds_gpio,
&wl127x_device,
&panda_dss_device,
&sdp4430_hdmi_audio_device,