提交 c9675829 编写于 作者: U Uwe Kleine-König 提交者: Thierry Reding

pwm: fsl-ftm: Don't update the state for the caller of pwm_apply_state()

The pwm-fsl-ftm driver is one of only three PWM drivers which updates
the state for the caller of pwm_apply_state(). This might have
surprising results if the caller reuses the values expecting them to
still represent the same state.
Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 deb9c462
......@@ -292,10 +292,6 @@ static int fsl_pwm_apply_config(struct fsl_pwm_chip *fpc,
regmap_update_bits(fpc->regmap, FTM_POL, BIT(pwm->hwpwm), reg_polarity);
newstate->period = fsl_pwm_ticks_to_ns(fpc,
fpc->period.mod_period + 1);
newstate->duty_cycle = fsl_pwm_ticks_to_ns(fpc, duty);
ftm_set_write_protection(fpc);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册