Skip to content

Commit 2e36a01

Browse files
Markus Pargmanngregkh
authored andcommitted
regulator: anatop: Set default voltage selector for vddpu
commit fe08be3 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9d91d6e commit 2e36a01

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)