diff options
author | Chaithrika U S <chaithrika@ti.com> | 2009-12-15 19:46:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:05 -0500 |
commit | d52f235f17a588c132a2aaf1e7fc49bb5707fe36 (patch) | |
tree | de25b87d63bf6ab597903e739243bb8770f1a64a /arch/arm/mach-davinci/board-da850-evm.c | |
parent | cfbd646fe060f70fe6618be2f9c25f739c067e29 (diff) |
da850/omap-l138: add callback to control LCD panel power
Add the platform specific callback to control LCD panel and backlight
power.
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/mach-davinci/board-da850-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 62b98bffc158..07de8db14581 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -339,6 +339,15 @@ static struct davinci_mmc_config da850_mmc_config = { | |||
339 | .version = MMC_CTLR_VERSION_2, | 339 | .version = MMC_CTLR_VERSION_2, |
340 | }; | 340 | }; |
341 | 341 | ||
342 | static void da850_panel_power_ctrl(int val) | ||
343 | { | ||
344 | /* lcd backlight */ | ||
345 | gpio_set_value(DA850_LCD_BL_PIN, val); | ||
346 | |||
347 | /* lcd power */ | ||
348 | gpio_set_value(DA850_LCD_PWR_PIN, val); | ||
349 | } | ||
350 | |||
342 | static int da850_lcd_hw_init(void) | 351 | static int da850_lcd_hw_init(void) |
343 | { | 352 | { |
344 | int status; | 353 | int status; |
@@ -356,17 +365,11 @@ static int da850_lcd_hw_init(void) | |||
356 | gpio_direction_output(DA850_LCD_BL_PIN, 0); | 365 | gpio_direction_output(DA850_LCD_BL_PIN, 0); |
357 | gpio_direction_output(DA850_LCD_PWR_PIN, 0); | 366 | gpio_direction_output(DA850_LCD_PWR_PIN, 0); |
358 | 367 | ||
359 | /* disable lcd backlight */ | 368 | /* Switch off panel power and backlight */ |
360 | gpio_set_value(DA850_LCD_BL_PIN, 0); | 369 | da850_panel_power_ctrl(0); |
361 | |||
362 | /* disable lcd power */ | ||
363 | gpio_set_value(DA850_LCD_PWR_PIN, 0); | ||
364 | |||
365 | /* enable lcd power */ | ||
366 | gpio_set_value(DA850_LCD_PWR_PIN, 1); | ||
367 | 370 | ||
368 | /* enable lcd backlight */ | 371 | /* Switch on panel power and backlight */ |
369 | gpio_set_value(DA850_LCD_BL_PIN, 1); | 372 | da850_panel_power_ctrl(1); |
370 | 373 | ||
371 | return 0; | 374 | return 0; |
372 | } | 375 | } |
@@ -674,6 +677,7 @@ static __init void da850_evm_init(void) | |||
674 | pr_warning("da850_evm_init: lcd initialization failed: %d\n", | 677 | pr_warning("da850_evm_init: lcd initialization failed: %d\n", |
675 | ret); | 678 | ret); |
676 | 679 | ||
680 | sharp_lk043t1dg01_pdata.panel_power_ctrl = da850_panel_power_ctrl, | ||
677 | ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata); | 681 | ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata); |
678 | if (ret) | 682 | if (ret) |
679 | pr_warning("da850_evm_init: lcdc registration failed: %d\n", | 683 | pr_warning("da850_evm_init: lcdc registration failed: %d\n", |