OSDN Git Service

pwm: imx27: Cache duty cycle register value
authorThierry Reding <thierry.reding@gmail.com>
Thu, 17 Oct 2019 10:56:00 +0000 (12:56 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 9 Dec 2019 09:05:43 +0000 (10:05 +0100)
commita3597d6c89d70ff0bcb1dd74dc0a88442fe79da6
tree302f0ee7904e2c5221b200675f50322be716535f
parent1db37f9561b2b3f57d84b6253a9cd97f6289f8e1
pwm: imx27: Cache duty cycle register value

The hardware register containing the duty cycle value cannot be accessed
when the PWM is disabled. This causes the ->get_state() callback to read
back a duty cycle value of 0, which can confuse consumer drivers.

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