提交 fd4f99c4 编写于 作者: B Boris Brezillon 提交者: 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: NBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: NMark Brown <broonie@kernel.org>
Acked-by: NBrian Norris <briannorris@chromium.org>
Tested-by: NBrian Norris <briannorris@chromium.org>
Tested-by: NHeiko Stuebner <heiko@sntech.de>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册