diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2014-10-06 21:33:36 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 12:23:41 +0100 |
commit | fe08be3ec8672ed92b3ed1b85810df9fa0f98931 (patch) | |
tree | 314c09236a44837ec0561ec73456e653c72611fd /drivers/regulator/anatop-regulator.c | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
download | op-kernel-dev-fe08be3ec8672ed92b3ed1b85810df9fa0f98931.zip op-kernel-dev-fe08be3ec8672ed92b3ed1b85810df9fa0f98931.tar.gz |
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
Diffstat (limited to 'drivers/regulator/anatop-regulator.c')
-rw-r--r-- | drivers/regulator/anatop-regulator.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 4f730af..30e8d7a 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -283,6 +283,14 @@ static int anatop_regulator_probe(struct platform_device *pdev) sreg->sel = 0; sreg->bypass = true; } + + /* + * In case vddpu was disabled by the bootloader, we need to set + * a sane default until imx6-cpufreq was probed and changes the + * voltage to the correct value. In this case we set 1.25V. + */ + if (!sreg->sel && !strcmp(sreg->name, "vddpu")) + sreg->sel = 22; } else { rdesc->ops = &anatop_rops; } |