The code reads the default voltage selector from its register.
If the default voltage selector is 0 which results in faulty
behaviour of this regulator driver.
This patch sets a default voltage selector for vddpcie-phy if
it is not set in the register.
Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
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 && !strcmp(sreg->name, "vddpcie-phy"))
+ sreg->sel = 0x10;
+
if (!sreg->bypass && !sreg->sel) {
dev_err(&pdev->dev, "Failed to read a valid default voltage selector.\n");
return -EINVAL;