summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDong Aisheng <aisheng.dong@nxp.com>2017-04-12 09:58:47 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-24 10:58:40 +0100
commit5eb153f601ac230945577d16ef28866a0f84e183 (patch)
tree8b6d762e3336b002548f33da33c06580a5d2eaa0
parentfb3e508f145f5ff5d308e5a1a743562d15ef51d1 (diff)
downloadlinux-stable-5eb153f601ac230945577d16ef28866a0f84e183.tar.gz
linux-stable-5eb153f601ac230945577d16ef28866a0f84e183.tar.bz2
linux-stable-5eb153f601ac230945577d16ef28866a0f84e183.zip
regulator: anatop: set default voltage selector for pcie
[ Upstream commit 9bf944548169f6153c3d3778cf983cb5db251a0e ] Set the initial voltage selector for vddpcie in case it's disabled by default. This fixes the below warning: 20c8000.anatop:regulator-vddpcie: Failed to read a valid default voltage selector. anatop_regulator: probe of 20c8000.anatop:regulator-vddpcie failed with error -22 Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Robin Gong <yibin.gong@nxp.com> Cc: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/regulator/anatop-regulator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 3a6d0290c54c..c5e272ea4372 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -296,6 +296,11 @@ static int anatop_regulator_probe(struct platform_device *pdev)
if (!sreg->sel && !strcmp(sreg->name, "vddpu"))
sreg->sel = 22;
+ /* set the default voltage of the pcie phy to be 1.100v */
+ if (!sreg->sel && rdesc->name &&
+ !strcmp(rdesc->name, "vddpcie"))
+ sreg->sel = 0x10;
+
if (!sreg->bypass && !sreg->sel) {
dev_err(&pdev->dev, "Failed to read a valid default voltage selector.\n");
return -EINVAL;