]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: tiehrpwm: Update shadow register for disabling PWMs
authorChristoph Vogtländer <c.vogtlaender@sigma-surface-science.com>
Tue, 12 Mar 2019 09:08:46 +0000 (14:38 +0530)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 20 Mar 2019 11:31:07 +0000 (12:31 +0100)
commit0a617095904a8e60ca43d0e1983deb80815812ef
tree27a2b114189ea811470238d45285a06063f66129
parent8a208cc535f1f906d202a7030e7507c874f26982
pwm: tiehrpwm: Update shadow register for disabling PWMs

It must be made sure that immediate mode is not already set, when
modifying shadow register value in ehrpwm_pwm_disable(). Otherwise
modifications to the action-qualifier continuous S/W force
register(AQSFRC) will be done in the active register.
This may happen when both channels are being disabled. In this case,
only the first channel state will be recorded as disabled in the shadow
register. Later, when enabling the first channel again, the second
channel would be enabled as well. Setting RLDCSF to zero, first, ensures
that the shadow register is updated as desired.

Fixes: 0fe03b87ffe3 ("pwm: tiehrpwm: Fix disabling of output of PWMs")
Signed-off-by: Christoph Vogtländer <c.vogtlaender@sigma-surface-science.com>
[vigneshr@ti.com: Improve commit message]
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-tiehrpwm.c