Commit fd4f99c4 authored by Boris Brezillon's avatar Boris Brezillon Committed by Thierry Reding

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: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarBrian Norris <briannorris@chromium.org>
Tested-by: default avatarBrian Norris <briannorris@chromium.org>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 6fa231b7
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment