Skip to content

Commit

Permalink
regulator: anatop: set default voltage selector for pcie
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dong Aisheng authored and broonie committed Apr 13, 2017
1 parent aeb1404 commit 9bf9445
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/regulator/anatop-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ static int anatop_regulator_probe(struct platform_device *pdev)
if (!sreg->sel && !strcmp(rdesc->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;
Expand Down

0 comments on commit 9bf9445

Please sign in to comment.