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-h3.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-h3.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 108a8640fc6f..c6ec9b42ca29 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.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/setup.h> | 36 | #include <asm/setup.h> |
36 | #include <asm/page.h> | 37 | #include <asm/page.h> |
@@ -324,6 +325,32 @@ static struct spi_board_info h3_spi_board_info[] __initdata = { | |||
324 | }, | 325 | }, |
325 | }; | 326 | }; |
326 | 327 | ||
328 | static struct gpio_led h3_gpio_led_pins[] = { | ||
329 | { | ||
330 | .name = "h3:red", | ||
331 | .default_trigger = "heartbeat", | ||
332 | .gpio = 3, | ||
333 | }, | ||
334 | { | ||
335 | .name = "h3:green", | ||
336 | .default_trigger = "cpu0", | ||
337 | .gpio = OMAP_MPUIO(4), | ||
338 | }, | ||
339 | }; | ||
340 | |||
341 | static struct gpio_led_platform_data h3_gpio_led_data = { | ||
342 | .leds = h3_gpio_led_pins, | ||
343 | .num_leds = ARRAY_SIZE(h3_gpio_led_pins), | ||
344 | }; | ||
345 | |||
346 | static struct platform_device h3_gpio_leds = { | ||
347 | .name = "leds-gpio", | ||
348 | .id = -1, | ||
349 | .dev = { | ||
350 | .platform_data = &h3_gpio_led_data, | ||
351 | }, | ||
352 | }; | ||
353 | |||
327 | static struct platform_device *devices[] __initdata = { | 354 | static struct platform_device *devices[] __initdata = { |
328 | &nor_device, | 355 | &nor_device, |
329 | &nand_device, | 356 | &nand_device, |
@@ -331,6 +358,7 @@ static struct platform_device *devices[] __initdata = { | |||
331 | &intlat_device, | 358 | &intlat_device, |
332 | &h3_kp_device, | 359 | &h3_kp_device, |
333 | &h3_lcd_device, | 360 | &h3_lcd_device, |
361 | &h3_gpio_leds, | ||
334 | }; | 362 | }; |
335 | 363 | ||
336 | static struct omap_usb_config h3_usb_config __initdata = { | 364 | static struct omap_usb_config h3_usb_config __initdata = { |
@@ -398,6 +426,10 @@ static void __init h3_init(void) | |||
398 | omap_cfg_reg(E19_1610_KBR4); | 426 | omap_cfg_reg(E19_1610_KBR4); |
399 | omap_cfg_reg(N19_1610_KBR5); | 427 | omap_cfg_reg(N19_1610_KBR5); |
400 | 428 | ||
429 | /* GPIO based LEDs */ | ||
430 | omap_cfg_reg(P18_1610_GPIO3); | ||
431 | omap_cfg_reg(MPUIO4); | ||
432 | |||
401 | smc91x_resources[1].start = gpio_to_irq(40); | 433 | smc91x_resources[1].start = gpio_to_irq(40); |
402 | smc91x_resources[1].end = gpio_to_irq(40); | 434 | smc91x_resources[1].end = gpio_to_irq(40); |
403 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 435 | platform_add_devices(devices, ARRAY_SIZE(devices)); |