Revert "regulator: pwm: remove init voltage setting"

This reverts commit ef473e3642.

We merged this commit while we didn't notice that this driver gets
init voltage from legacy "rockchip,pwm_voltage = <...>", but regulator
uclass gets it from "regulator-init-microvolt = <...>". so we have to
revert this commit to compatible the legacy one.

Change-Id: I52606d9a9268659d3d77f7d29d1eed1d80b30b1e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2020-05-27 15:39:33 +08:00
parent 7c79bd2280
commit 25a7c60a0b
1 changed files with 6 additions and 0 deletions

View File

@ -139,6 +139,12 @@ static int pwm_regulator_probe(struct udevice *dev)
priv->max_voltage = uc_pdata->max_uV;
priv->min_voltage = uc_pdata->min_uV;
if (priv->init_voltage > 0) {
debug("pwm-regulator(%s): init %d uV\n",
dev->name, priv->init_voltage);
pwm_regulator_set_voltage(dev, priv->init_voltage);
}
return 0;
}