]> www.infradead.org Git - users/dwmw2/linux.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)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 23 Sep 2019 20:11:34 +0000 (21:11 +0100)
commit7e00d631e596eed256e314e2d0a6cdce1ac7c2b9
treecfecf071cb1c7748d41acbd4fbcd07cd10f28134
parent811f5bba33330cb071bba3532ff6f81718b20af7
pwm: tiehrpwm: Update shadow register for disabling PWMs

commit b00ef53053191d3025c15e8041699f8c9d132daf upstream.

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: 38dabd91ff0b ("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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/pwm/pwm-tiehrpwm.c