diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-osk.c')
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 2f1f9b967576..5973945a8741 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -382,10 +382,37 @@ static struct platform_device osk5912_lcd_device = { | |||
382 | .id = -1, | 382 | .id = -1, |
383 | }; | 383 | }; |
384 | 384 | ||
385 | static struct gpio_led mistral_gpio_led_pins[] = { | ||
386 | { | ||
387 | .name = "mistral:red", | ||
388 | .default_trigger = "heartbeat", | ||
389 | .gpio = 3, | ||
390 | }, | ||
391 | { | ||
392 | .name = "mistral:green", | ||
393 | .default_trigger = "cpu0", | ||
394 | .gpio = OMAP_MPUIO(4), | ||
395 | }, | ||
396 | }; | ||
397 | |||
398 | static struct gpio_led_platform_data mistral_gpio_led_data = { | ||
399 | .leds = mistral_gpio_led_pins, | ||
400 | .num_leds = ARRAY_SIZE(mistral_gpio_led_pins), | ||
401 | }; | ||
402 | |||
403 | static struct platform_device mistral_gpio_leds = { | ||
404 | .name = "leds-gpio", | ||
405 | .id = -1, | ||
406 | .dev = { | ||
407 | .platform_data = &mistral_gpio_led_data, | ||
408 | }, | ||
409 | }; | ||
410 | |||
385 | static struct platform_device *mistral_devices[] __initdata = { | 411 | static struct platform_device *mistral_devices[] __initdata = { |
386 | &osk5912_kp_device, | 412 | &osk5912_kp_device, |
387 | &mistral_bl_device, | 413 | &mistral_bl_device, |
388 | &osk5912_lcd_device, | 414 | &osk5912_lcd_device, |
415 | &mistral_gpio_leds, | ||
389 | }; | 416 | }; |
390 | 417 | ||
391 | static int mistral_get_pendown_state(void) | 418 | static int mistral_get_pendown_state(void) |
@@ -510,6 +537,12 @@ static void __init osk_mistral_init(void) | |||
510 | if (gpio_request(2, "lcd_pwr") == 0) | 537 | if (gpio_request(2, "lcd_pwr") == 0) |
511 | gpio_direction_output(2, 1); | 538 | gpio_direction_output(2, 1); |
512 | 539 | ||
540 | /* | ||
541 | * GPIO based LEDs | ||
542 | */ | ||
543 | omap_cfg_reg(P18_1610_GPIO3); | ||
544 | omap_cfg_reg(MPUIO4); | ||
545 | |||
513 | i2c_register_board_info(1, mistral_i2c_board_info, | 546 | i2c_register_board_info(1, mistral_i2c_board_info, |
514 | ARRAY_SIZE(mistral_i2c_board_info)); | 547 | ARRAY_SIZE(mistral_i2c_board_info)); |
515 | 548 | ||