regulator: Add soft start support
Some regulators support a "soft start" feature where the voltage ramps up slowly when the regulator is enabled. Add an op (set_soft_start) and a DT property + constraint to support this. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@ -1059,6 +1059,14 @@ static int set_machine_constraints(struct regulator_dev *rdev,
|
||||
}
|
||||
}
|
||||
|
||||
if (rdev->constraints->soft_start && ops->set_soft_start) {
|
||||
ret = ops->set_soft_start(rdev);
|
||||
if (ret < 0) {
|
||||
rdev_err(rdev, "failed to set soft start\n");
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
print_constraints(rdev);
|
||||
return 0;
|
||||
out:
|
||||
|
Reference in New Issue
Block a user