platform: msm_shared: Add backlight control function
Add backlight control function to msm power on/power
off sequences. This decouples the backlight power
on from the panel power on, removing the flicker
that would occur during a panel reinititialization.
Change-Id: I37df5d44d6b18529a0204f743a0fcb79d477d96d
diff --git a/platform/msm_shared/display.c b/platform/msm_shared/display.c
index c420af6..6f608d1 100644
--- a/platform/msm_shared/display.c
+++ b/platform/msm_shared/display.c
@@ -285,6 +285,13 @@
if (ret)
goto msm_display_init_out;
+ /* Turn on backlight */
+ if (pdata->bl_func)
+ ret = pdata->bl_func(1);
+
+ if (ret)
+ goto msm_display_init_out;
+
msm_display_init_out:
return ret;
}
@@ -341,6 +348,10 @@
return NO_ERROR;
}
+ /* Turn off backlight */
+ if (panel->bl_func)
+ ret = panel->bl_func(0);
+
if (pinfo->off)
ret = pinfo->off();
diff --git a/platform/msm_shared/include/msm_panel.h b/platform/msm_shared/include/msm_panel.h
index 9e4a8b9..b586de0 100755
--- a/platform/msm_shared/include/msm_panel.h
+++ b/platform/msm_shared/include/msm_panel.h
@@ -215,6 +215,7 @@
/* function entry chain */
int (*power_func) (int enable);
int (*clk_func) (int enable);
+ int (*bl_func) (int enable);
int (*pll_clk_func) (int enable, struct msm_panel_info *);
};