Commit 114cf338 authored by Chaithrika U S's avatar Chaithrika U S Committed by Kevin Hilman

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: default avatarChaithrika U S <chaithrika@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 331b2976
...@@ -352,6 +352,15 @@ static struct davinci_mmc_config da850_mmc_config = { ...@@ -352,6 +352,15 @@ static struct davinci_mmc_config da850_mmc_config = {
.version = MMC_CTLR_VERSION_2, .version = MMC_CTLR_VERSION_2,
}; };
static void da850_panel_power_ctrl(int val)
{
/* lcd backlight */
gpio_set_value(DA850_LCD_BL_PIN, val);
/* lcd power */
gpio_set_value(DA850_LCD_PWR_PIN, val);
}
static int da850_lcd_hw_init(void) static int da850_lcd_hw_init(void)
{ {
int status; int status;
...@@ -369,17 +378,11 @@ static int da850_lcd_hw_init(void) ...@@ -369,17 +378,11 @@ static int da850_lcd_hw_init(void)
gpio_direction_output(DA850_LCD_BL_PIN, 0); gpio_direction_output(DA850_LCD_BL_PIN, 0);
gpio_direction_output(DA850_LCD_PWR_PIN, 0); gpio_direction_output(DA850_LCD_PWR_PIN, 0);
/* disable lcd backlight */ /* Switch off panel power and backlight */
gpio_set_value(DA850_LCD_BL_PIN, 0); da850_panel_power_ctrl(0);
/* disable lcd power */
gpio_set_value(DA850_LCD_PWR_PIN, 0);
/* enable lcd power */
gpio_set_value(DA850_LCD_PWR_PIN, 1);
/* enable lcd backlight */ /* Switch on panel power and backlight */
gpio_set_value(DA850_LCD_BL_PIN, 1); da850_panel_power_ctrl(1);
return 0; return 0;
} }
...@@ -687,6 +690,7 @@ static __init void da850_evm_init(void) ...@@ -687,6 +690,7 @@ static __init void da850_evm_init(void)
pr_warning("da850_evm_init: lcd initialization failed: %d\n", pr_warning("da850_evm_init: lcd initialization failed: %d\n",
ret); ret);
sharp_lk043t1dg01_pdata.panel_power_ctrl = da850_panel_power_ctrl,
ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata); ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata);
if (ret) if (ret)
pr_warning("da850_evm_init: lcdc registration failed: %d\n", pr_warning("da850_evm_init: lcdc registration failed: %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment