diff options
author | Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> | 2010-09-23 21:22:49 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-09-24 20:37:35 -0400 |
commit | 3da434acd4f7c7f5aeebd44fed42bf5ed9adfc44 (patch) | |
tree | 70efec35e1cc62fd742198592adf24dfad95c7d0 /arch/arm/mach-omap2/board-omap4panda.c | |
parent | 94ce7a6628ccaa71f0a5f26f6ff7dc7b0f0f65b7 (diff) |
omap4: board-omap4panda: 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). The patch basically adds the
platform data required by leds-gpio driver.
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index c03d1d56db56..22a8fd30f9ff 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/leds.h> | ||
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | #include <linux/usb/otg.h> | 25 | #include <linux/usb/otg.h> |
25 | #include <linux/i2c/twl.h> | 26 | #include <linux/i2c/twl.h> |
@@ -40,6 +41,36 @@ | |||
40 | #include "hsmmc.h" | 41 | #include "hsmmc.h" |
41 | 42 | ||
42 | 43 | ||
44 | static struct gpio_led gpio_leds[] = { | ||
45 | { | ||
46 | .name = "pandaboard::status1", | ||
47 | .default_trigger = "heartbeat", | ||
48 | .gpio = 7, | ||
49 | }, | ||
50 | { | ||
51 | .name = "pandaboard::status2", | ||
52 | .default_trigger = "mmc0", | ||
53 | .gpio = 8, | ||
54 | }, | ||
55 | }; | ||
56 | |||
57 | static struct gpio_led_platform_data gpio_led_info = { | ||
58 | .leds = gpio_leds, | ||
59 | .num_leds = ARRAY_SIZE(gpio_leds), | ||
60 | }; | ||
61 | |||
62 | static struct platform_device leds_gpio = { | ||
63 | .name = "leds-gpio", | ||
64 | .id = -1, | ||
65 | .dev = { | ||
66 | .platform_data = &gpio_led_info, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | static struct platform_device *panda_devices[] __initdata = { | ||
71 | &leds_gpio, | ||
72 | }; | ||
73 | |||
43 | static void __init omap4_panda_init_irq(void) | 74 | static void __init omap4_panda_init_irq(void) |
44 | { | 75 | { |
45 | omap2_init_common_hw(NULL, NULL); | 76 | omap2_init_common_hw(NULL, NULL); |
@@ -277,6 +308,7 @@ static void __init omap4_panda_init(void) | |||
277 | int status; | 308 | int status; |
278 | 309 | ||
279 | omap4_panda_i2c_init(); | 310 | omap4_panda_i2c_init(); |
311 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); | ||
280 | omap_serial_init(); | 312 | omap_serial_init(); |
281 | omap4_twl6030_hsmmc_init(mmc); | 313 | omap4_twl6030_hsmmc_init(mmc); |
282 | /* OMAP4 Panda uses internal transceiver so register nop transceiver */ | 314 | /* OMAP4 Panda uses internal transceiver so register nop transceiver */ |