disp: msm: config AB/IBB power when AOD mode enter/exit
ELVDD/ELVSS has a dip during AMODE panel AOD exit hand-off. According to PMIC team's suggestion, need to config the AB/IBB power to REGULATOR_MODE_IDLE/REGULATOR_MODE_NORMAL to fix dips. Change-Id: Ia5cbd4d698de262e02a660f670865c03dda1e04a Signed-off-by: Wenjun Zhang <wjzhan@codeaurora.org> Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

vanhempi
bb2f60b35c
commit
2da9889075
@@ -378,3 +378,51 @@ int dsi_pwr_enable_regulator(struct dsi_regulator_info *regs, bool enable)
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* dsi_pwr_panel_regulator_mode_set()
|
||||
* set the AB/IBB regulator mode for OLED panel
|
||||
* AOD mode entry and exit
|
||||
* @regs: Pointer to set of regulators to enable or disable.
|
||||
* @reg_name: Name of panel power we want to set.
|
||||
* @retulator_mode: Regulator mode values, like:
|
||||
* REGULATOR_MODE_INVALID
|
||||
* REGULATOR_MODE_FAST
|
||||
* REGULATOR_MODE_NORMAL
|
||||
* REGULATOR_MODE_IDLE
|
||||
* REGULATOR_MODE_STANDBY
|
||||
*
|
||||
* return: error code in case of failure or 0 for success.
|
||||
*/
|
||||
int dsi_pwr_panel_regulator_mode_set(struct dsi_regulator_info *regs,
|
||||
const char *reg_name,
|
||||
int regulator_mode)
|
||||
{
|
||||
int i = 0, rc = 0;
|
||||
struct dsi_vreg *vreg;
|
||||
|
||||
if (regs->count == 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (!regs->vregs)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < regs->count; i++) {
|
||||
vreg = ®s->vregs[i];
|
||||
if (!strcmp(vreg->vreg_name, reg_name)) {
|
||||
rc = regulator_set_mode(vreg->vreg,
|
||||
regulator_mode);
|
||||
if (rc)
|
||||
DSI_ERR("Regulator %s set mode %d failed\n",
|
||||
vreg->vreg_name, rc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= regs->count) {
|
||||
DSI_ERR("Regulator %s was not found\n", reg_name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
Viittaa uudesa ongelmassa
Block a user