diff options
author | Boris Brezillon <[email protected]> | 2016-06-14 11:13:17 +0200 |
---|---|---|
committer | Thierry Reding <[email protected]> | 2016-07-11 08:41:37 +0200 |
commit | fd4f99c4c3ce8ccd9b8ea751afc614a7624ecef2 (patch) | |
tree | 15b2e246b90c8ebf65229ea3eb76277fd282b445 | |
parent | 6fa231b778d9cf3b18d50b594c9da1d63a6864ac (diff) |
regulator: pwm: Adjust PWM config at probe time
The PWM attached to a PWM regulator device might have been previously
configured by the bootloader.
Make sure the bootloader and linux config are in sync, and adjust the PWM
config if that's not the case.
Signed-off-by: Boris Brezillon <[email protected]>
Acked-by: Mark Brown <[email protected]>
Acked-by: Brian Norris <[email protected]>
Tested-by: Brian Norris <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
-rw-r--r-- | drivers/regulator/pwm-regulator.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index 666bc3bb52ef..cb2f22c02469 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c @@ -316,11 +316,9 @@ static int pwm_regulator_probe(struct platform_device *pdev) return ret; } - /* - * FIXME: pwm_apply_args() should be removed when switching to the - * atomic PWM API. - */ - pwm_apply_args(drvdata->pwm); + ret = pwm_adjust_config(drvdata->pwm); + if (ret) + return ret; regulator = devm_regulator_register(&pdev->dev, &drvdata->desc, &config); |