diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 44a4ab195fbc..376f7f29ef77 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -31,17 +31,19 @@ | |||
31 | #include <linux/i2c/tps65010.h> | 31 | #include <linux/i2c/tps65010.h> |
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> | ||
35 | #include <linux/leds.h> | ||
34 | 36 | ||
35 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
37 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
38 | 40 | ||
39 | #include <plat/mux.h> | 41 | #include <mach/mux.h> |
40 | #include <plat/dma.h> | 42 | #include <plat/dma.h> |
41 | #include <plat/tc.h> | 43 | #include <plat/tc.h> |
42 | #include <plat/irda.h> | 44 | #include <mach/irda.h> |
43 | #include <plat/keypad.h> | 45 | #include <linux/platform_data/keypad-omap.h> |
44 | #include <plat/flash.h> | 46 | #include <mach/flash.h> |
45 | 47 | ||
46 | #include <mach/hardware.h> | 48 | #include <mach/hardware.h> |
47 | #include <mach/usb.h> | 49 | #include <mach/usb.h> |
@@ -306,12 +308,39 @@ static struct platform_device h2_irda_device = { | |||
306 | .resource = h2_irda_resources, | 308 | .resource = h2_irda_resources, |
307 | }; | 309 | }; |
308 | 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 | |||
309 | static struct platform_device *h2_devices[] __initdata = { | 337 | static struct platform_device *h2_devices[] __initdata = { |
310 | &h2_nor_device, | 338 | &h2_nor_device, |
311 | &h2_nand_device, | 339 | &h2_nand_device, |
312 | &h2_smc91x_device, | 340 | &h2_smc91x_device, |
313 | &h2_irda_device, | 341 | &h2_irda_device, |
314 | &h2_kp_device, | 342 | &h2_kp_device, |
343 | &h2_gpio_leds, | ||
315 | }; | 344 | }; |
316 | 345 | ||
317 | static void __init h2_init_smc91x(void) | 346 | static void __init h2_init_smc91x(void) |
@@ -406,6 +435,10 @@ static void __init h2_init(void) | |||
406 | omap_cfg_reg(E19_1610_KBR4); | 435 | omap_cfg_reg(E19_1610_KBR4); |
407 | omap_cfg_reg(N19_1610_KBR5); | 436 | omap_cfg_reg(N19_1610_KBR5); |
408 | 437 | ||
438 | /* GPIO based LEDs */ | ||
439 | omap_cfg_reg(P18_1610_GPIO3); | ||
440 | omap_cfg_reg(MPUIO4); | ||
441 | |||
409 | h2_smc91x_resources[1].start = gpio_to_irq(0); | 442 | h2_smc91x_resources[1].start = gpio_to_irq(0); |
410 | h2_smc91x_resources[1].end = gpio_to_irq(0); | 443 | h2_smc91x_resources[1].end = gpio_to_irq(0); |
411 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); | 444 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); |