dev: gcdb: don't configure PMIC WLED if DCS backlight is used
SKUF uses DCS command to control backlight, extra WLED configure
will cause bottom current leakage
Change-Id: Ia0022832dadc4b1b4655e3bc1ce8d36e072a6a44
CRs-fixed: 525921
diff --git a/dev/gcdb/display/gcdb_display.c b/dev/gcdb/display/gcdb_display.c
index e117ba2..169fb1c 100755
--- a/dev/gcdb/display/gcdb_display.c
+++ b/dev/gcdb/display/gcdb_display.c
@@ -58,11 +58,15 @@
extern int msm_display_init(struct msm_fb_panel_data *pdata);
extern int msm_display_off();
+/* TODO: add other backlight type support */
static uint32_t panel_backlight_ctrl(uint8_t enable)
{
uint32_t ret = NO_ERROR;
- ret = target_backlight_ctrl(enable);
+ if (panelstruct.backlightinfo->bl_pmic_controltype != BL_DCS) {
+ /* deal with non-dcs backlight */
+ ret = target_backlight_ctrl(enable);
+ }
return ret;
}
diff --git a/dev/gcdb/display/include/panel.h b/dev/gcdb/display/include/panel.h
index 726af88..3056fbf 100755
--- a/dev/gcdb/display/include/panel.h
+++ b/dev/gcdb/display/include/panel.h
@@ -143,6 +143,13 @@
uint8_t tclk_pre;
};
+enum {
+ BL_PWM = 0,
+ BL_WLED,
+ BL_DCS,
+ BL_LPG,
+};
+
typedef struct backlight {
uint16_t bl_interface_type;
uint16_t bl_min_level;