diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index af283a2bc7c7..376f7f29ef77 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/smc91x.h> | 32 | #include <linux/smc91x.h> |
33 | #include <linux/omapfb.h> | 33 | #include <linux/omapfb.h> |
34 | #include <linux/platform_data/gpio-omap.h> | 34 | #include <linux/platform_data/gpio-omap.h> |
35 | #include <linux/leds.h> | ||
35 | 36 | ||
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
@@ -307,12 +308,39 @@ static struct platform_device h2_irda_device = { | |||
307 | .resource = h2_irda_resources, | 308 | .resource = h2_irda_resources, |
308 | }; | 309 | }; |
309 | 310 | ||
311 | static struct gpio_led h2_gpio_led_pins[] = { | ||
312 | { | ||
313 | .name = "h2:red", | ||
314 | .default_trigger = "heartbeat", | ||
315 | .gpio = 3, | ||
316 | }, | ||
317 | { | ||
318 | .name = "h2:green", | ||
319 | .default_trigger = "cpu0", | ||
320 | .gpio = OMAP_MPUIO(4), | ||
321 | }, | ||
322 | }; | ||
323 | |||
324 | static struct gpio_led_platform_data h2_gpio_led_data = { | ||
325 | .leds = h2_gpio_led_pins, | ||
326 | .num_leds = ARRAY_SIZE(h2_gpio_led_pins), | ||
327 | }; | ||
328 | |||
329 | static struct platform_device h2_gpio_leds = { | ||
330 | .name = "leds-gpio", | ||
331 | .id = -1, | ||
332 | .dev = { | ||
333 | .platform_data = &h2_gpio_led_data, | ||
334 | }, | ||
335 | }; | ||
336 | |||
310 | static struct platform_device *h2_devices[] __initdata = { | 337 | static struct platform_device *h2_devices[] __initdata = { |
311 | &h2_nor_device, | 338 | &h2_nor_device, |
312 | &h2_nand_device, | 339 | &h2_nand_device, |
313 | &h2_smc91x_device, | 340 | &h2_smc91x_device, |
314 | &h2_irda_device, | 341 | &h2_irda_device, |
315 | &h2_kp_device, | 342 | &h2_kp_device, |
343 | &h2_gpio_leds, | ||
316 | }; | 344 | }; |
317 | 345 | ||
318 | static void __init h2_init_smc91x(void) | 346 | static void __init h2_init_smc91x(void) |
@@ -407,6 +435,10 @@ static void __init h2_init(void) | |||
407 | omap_cfg_reg(E19_1610_KBR4); | 435 | omap_cfg_reg(E19_1610_KBR4); |
408 | omap_cfg_reg(N19_1610_KBR5); | 436 | omap_cfg_reg(N19_1610_KBR5); |
409 | 437 | ||
438 | /* GPIO based LEDs */ | ||
439 | omap_cfg_reg(P18_1610_GPIO3); | ||
440 | omap_cfg_reg(MPUIO4); | ||
441 | |||
410 | h2_smc91x_resources[1].start = gpio_to_irq(0); | 442 | h2_smc91x_resources[1].start = gpio_to_irq(0); |
411 | h2_smc91x_resources[1].end = gpio_to_irq(0); | 443 | h2_smc91x_resources[1].end = gpio_to_irq(0); |
412 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); | 444 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); |