summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorIrina Tirdea <irina.tirdea@nxp.com>2017-02-02 13:08:30 +0200
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commitd8ab2ab82d7755cc8e50c5176496805aebbfa5a6 (patch)
tree796de4d17ec81feae0a8cdb8541cd83d5f37c6da /drivers/regulator
parent1f211a21e406463ff33a0919d33c3a4cad25f2bf (diff)
MLK-13793-3 regulator: anatop: Fix enable for vddpu with LDO bypass
Enabling the vddpu regulator at boot has no efect, since the enable call in anatop will set it to power gated off. This leads to a hang in the VPU driver if cpufreq does not get initialized before. The anatop on i.MX6 requires that vddpu uses the same voltage level as vddsoc. When it is initialized, vddsoc will have a default selector of 0 (Power gated off), but will use LDO_FET_FULL_ON since it is in bypass mode. However, the local value saved for the vddsoc selector will remain 0. When vddpu is enabled, it will use the local selector 0 from vddsoc and will remain disabled. Take into consideration the bypass mode when using the vddsoc selector for vddpu. Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/anatop-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 9d88186b7aa7..d3fbf6ea305c 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -96,7 +96,7 @@ static int anatop_core_regmap_enable(struct regulator_dev *reg)
* whenever it's about to be enabled.
*/
if (anatop_reg == vddpu && vddsoc)
- anatop_reg->sel = vddsoc->sel;
+ anatop_reg->sel = vddsoc->bypass ? LDO_FET_FULL_ON : vddsoc->sel;
sel = anatop_reg->bypass ? LDO_FET_FULL_ON : anatop_reg->sel;
return regulator_set_voltage_sel_regmap(reg, sel);