Skip to content

Commit fe08be3

Browse files
Markus Pargmannbroonie
authored andcommitted
regulator: anatop: Set default voltage selector for vddpu
The code reads the default voltage selector from its register. If the bootloader disables the regulator, the default voltage selector will be 0 which results in faulty behaviour of this regulator driver. This patch sets a default voltage selector for vddpu if it is not set in the register. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
1 parent f114040 commit fe08be3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎drivers/regulator/anatop-regulator.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ static int anatop_regulator_probe(struct platform_device *pdev)
283283
sreg->sel = 0;
284284
sreg->bypass = true;
285285
}
286+
287+
/*
288+
* In case vddpu was disabled by the bootloader, we need to set
289+
* a sane default until imx6-cpufreq was probed and changes the
290+
* voltage to the correct value. In this case we set 1.25V.
291+
*/
292+
if (!sreg->sel && !strcmp(sreg->name, "vddpu"))
293+
sreg->sel = 22;
286294
} else {
287295
rdesc->ops = &anatop_rops;
288296
}

0 commit comments

Comments
 (0)