aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2016-06-14 05:13:17 -0400
committerThierry Reding <thierry.reding@gmail.com>2016-07-11 02:41:37 -0400
commitfd4f99c4c3ce8ccd9b8ea751afc614a7624ecef2 (patch)
tree15b2e246b90c8ebf65229ea3eb76277fd282b445 /drivers/regulator
parent6fa231b778d9cf3b18d50b594c9da1d63a6864ac (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 <boris.brezillon@free-electrons.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Brian Norris <briannorris@chromium.org> Tested-by: Brian Norris <briannorris@chromium.org> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/pwm-regulator.c8
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)
316 return ret; 316 return ret;
317 } 317 }
318 318
319 /* 319 ret = pwm_adjust_config(drvdata->pwm);
320 * FIXME: pwm_apply_args() should be removed when switching to the 320 if (ret)
321 * atomic PWM API. 321 return ret;
322 */
323 pwm_apply_args(drvdata->pwm);
324 322
325 regulator = devm_regulator_register(&pdev->dev, 323 regulator = devm_regulator_register(&pdev->dev,
326 &drvdata->desc, &config); 324 &drvdata->desc, &config);