]> git.karo-electronics.de Git - linux-beck.git/commit
pwm: atmel: Fix disabling of PWM channels
authorGuillermo Rodriguez <guille.rodriguez@gmail.com>
Fri, 13 May 2016 11:09:37 +0000 (13:09 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 11 Jul 2016 10:49:35 +0000 (12:49 +0200)
commitf718c54c1abab7171d375112bffd199046749953
tree20ac27d690f99b21855e2f9751381c0ea688aa2c
parent396d502c5167da69096c683c4566388ba42d2623
pwm: atmel: Fix disabling of PWM channels

When disabling a PWM channel, the PWM clock was being stopped
immediately after writing to PWM_DIS. As a result, the disabling
of the PWM channel did not complete properly, and the PWM output
might be left at the wrong level.

Fix this by waiting for the channel to be effectively disabled
(by checking the PWM_SR register) before disabling the clock.

Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-atmel.c