]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: ep93xx: Ensure configuring period and duty_cycle isn't wrongly skipped
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 1 Jul 2021 08:27:55 +0000 (10:27 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 8 Jul 2021 14:09:30 +0000 (16:09 +0200)
commit103c704feba01bc1183f22ae73ecc88d7c216fab
tree4685109238d026de25002d42db84791a1feef8f1
parentc0a29875f83c466ff8f5428c0b8531c9728544ee
pwm: ep93xx: Ensure configuring period and duty_cycle isn't wrongly skipped

As the last call to ep93xx_pwm_apply() might have exited early if
state->enabled was false, the values for period and duty_cycle stored in
pwm->state might not have been written to hardware and it must be
ensured that they are configured before enabling the PWM.

Fixes: 16a46d24095f ("pwm: ep93xx: Implement .apply callback")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-ep93xx.c