]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
pwm: tiehrpwm: Fix disabling of output of PWMs
authorVignesh R <vigneshr@ti.com>
Mon, 11 Jun 2018 06:09:56 +0000 (11:39 +0530)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:46:01 +0000 (19:46 -0600)
commit7ee4205ffa3e9e6edcbe0352f0a74454fbb7dba6
tree23885d7ef4cc6c0dea4beb2b2b58f6483d31aac1
parent6dc9d5f92bf73129b85d30d13936c8f6144a97f6
pwm: tiehrpwm: Fix disabling of output of PWMs

BugLink: https://bugs.launchpad.net/bugs/1835972
commit 38dabd91ff0bde33352ca3cc65ef515599b77a05 upstream.

pwm-tiehrpwm driver disables PWM output by putting it in low output
state via active AQCSFRC register in ehrpwm_pwm_disable(). But, the
AQCSFRC shadow register is not updated. Therefore, when shadow AQCSFRC
register is re-enabled in ehrpwm_pwm_enable() (say to enable second PWM
output), previous settings are lost as shadow register value is loaded
into active register. This results in things like PWMA getting enabled
automatically, when PWMB is enabled and vice versa. Fix this by
updating AQCSFRC shadow register as well during ehrpwm_pwm_disable().

Fixes: 19891b20e7c2 ("pwm: pwm-tiehrpwm: PWM driver support for EHRPWM")
Cc: stable@vger.kernel.org
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/pwm/pwm-tiehrpwm.c