diff options
author | Bryan Wu <bryan.wu@canonical.com> | 2012-03-13 14:14:39 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@canonical.com> | 2012-07-31 23:22:13 -0400 |
commit | dafbeadf4a9e1b2765641b687e3343be76d2eacd (patch) | |
tree | 81eb2fd9b19d1e3d70cc0af4c3c414500fcf7469 /arch/arm/mach-omap1/board-h2.c | |
parent | 4ad541901e5ba7aa18b46d7badf8a54eb7f174fe (diff) |
ARM: mach-omap1: retire custom LED code
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Tony Lindgren <tony@atomide.com>
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 a28e989a63f4..bf88046ad73f 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -31,6 +31,7 @@ | |||
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/leds.h> | ||
34 | 35 | ||
35 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
@@ -306,12 +307,39 @@ static struct platform_device h2_irda_device = { | |||
306 | .resource = h2_irda_resources, | 307 | .resource = h2_irda_resources, |
307 | }; | 308 | }; |
308 | 309 | ||
310 | static struct gpio_led h2_gpio_led_pins[] = { | ||
311 | { | ||
312 | .name = "h2:red", | ||
313 | .default_trigger = "heartbeat", | ||
314 | .gpio = 3, | ||
315 | }, | ||
316 | { | ||
317 | .name = "h2:green", | ||
318 | .default_trigger = "cpu0", | ||
319 | .gpio = OMAP_MPUIO(4), | ||
320 | }, | ||
321 | }; | ||
322 | |||
323 | static struct gpio_led_platform_data h2_gpio_led_data = { | ||
324 | .leds = h2_gpio_led_pins, | ||
325 | .num_leds = ARRAY_SIZE(h2_gpio_led_pins), | ||
326 | }; | ||
327 | |||
328 | static struct platform_device h2_gpio_leds = { | ||
329 | .name = "leds-gpio", | ||
330 | .id = -1, | ||
331 | .dev = { | ||
332 | .platform_data = &h2_gpio_led_data, | ||
333 | }, | ||
334 | }; | ||
335 | |||
309 | static struct platform_device *h2_devices[] __initdata = { | 336 | static struct platform_device *h2_devices[] __initdata = { |
310 | &h2_nor_device, | 337 | &h2_nor_device, |
311 | &h2_nand_device, | 338 | &h2_nand_device, |
312 | &h2_smc91x_device, | 339 | &h2_smc91x_device, |
313 | &h2_irda_device, | 340 | &h2_irda_device, |
314 | &h2_kp_device, | 341 | &h2_kp_device, |
342 | &h2_gpio_leds, | ||
315 | }; | 343 | }; |
316 | 344 | ||
317 | static void __init h2_init_smc91x(void) | 345 | static void __init h2_init_smc91x(void) |
@@ -406,6 +434,10 @@ static void __init h2_init(void) | |||
406 | omap_cfg_reg(E19_1610_KBR4); | 434 | omap_cfg_reg(E19_1610_KBR4); |
407 | omap_cfg_reg(N19_1610_KBR5); | 435 | omap_cfg_reg(N19_1610_KBR5); |
408 | 436 | ||
437 | /* GPIO based LEDs */ | ||
438 | omap_cfg_reg(P18_1610_GPIO3); | ||
439 | omap_cfg_reg(MPUIO4); | ||
440 | |||
409 | h2_smc91x_resources[1].start = gpio_to_irq(0); | 441 | h2_smc91x_resources[1].start = gpio_to_irq(0); |
410 | h2_smc91x_resources[1].end = gpio_to_irq(0); | 442 | h2_smc91x_resources[1].end = gpio_to_irq(0); |
411 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); | 443 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); |