pwm: imx27: Unconditionally write state to hardware
authorThierry Reding <thierry.reding@gmail.com>
Thu, 17 Oct 2019 15:11:41 +0000 (17:11 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 9 Dec 2019 09:05:46 +0000 (10:05 +0100)
commitbd88d319abe9a4bb6cc63b23cc760bec46e81fe6
tree8b7c26b1174148749e75c3bfe77de74213373bf1
parenta3597d6c89d70ff0bcb1dd74dc0a88442fe79da6
pwm: imx27: Unconditionally write state to hardware

The i.MX driver currently uses a shortcut and doesn't write all of the
state through to the hardware when the PWM is disabled. This causes an
inconsistent state to be read back by consumers with the result of them
malfunctioning.

Fix this by always writing the full state through to the hardware
registers so that the correct state can always be read back.

Tested-by: Michal Vokáč <michal.vokac@ysoft.com>
Tested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-imx27.c