提交 556a76e5 编写于 作者: B Bjorn Andersson 提交者: Rob Clark

drm: msm: dsi: Don't attempt changing voltage of switches

In some configurations the supplies are voltage switches and not LDOs,
making the set voltage call to fail. Check with the regulator framework
if the supply can change voltage before attempting.
Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com>
Reviewed-by: NArchit Taneja <architt@codeaurora.org>
Signed-off-by: NRob Clark <robdclark@gmail.com>
上级 8217e97a
...@@ -278,7 +278,7 @@ static int dsi_regulator_init(struct msm_dsi_host *msm_host) ...@@ -278,7 +278,7 @@ static int dsi_regulator_init(struct msm_dsi_host *msm_host)
} }
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
if ((regs[i].min_voltage >= 0) && (regs[i].max_voltage >= 0)) { if (regulator_can_change_voltage(s[i].consumer)) {
ret = regulator_set_voltage(s[i].consumer, ret = regulator_set_voltage(s[i].consumer,
regs[i].min_voltage, regs[i].max_voltage); regs[i].min_voltage, regs[i].max_voltage);
if (ret < 0) { if (ret < 0) {
......
...@@ -178,7 +178,7 @@ static int dsi_phy_regulator_init(struct msm_dsi_phy *phy) ...@@ -178,7 +178,7 @@ static int dsi_phy_regulator_init(struct msm_dsi_phy *phy)
} }
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
if ((regs[i].min_voltage >= 0) && (regs[i].max_voltage >= 0)) { if (regulator_can_change_voltage(s[i].consumer)) {
ret = regulator_set_voltage(s[i].consumer, ret = regulator_set_voltage(s[i].consumer,
regs[i].min_voltage, regs[i].max_voltage); regs[i].min_voltage, regs[i].max_voltage);
if (ret < 0) { if (ret < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册