pwm: atmel: Fix duty cycle calculation in .get_state()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 20 Apr 2021 09:51:17 +0000 (11:51 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 23 Apr 2021 17:05:31 +0000 (19:05 +0200)
commit453e8b3d8e36ddcb283b3d1698864a03ea45599a
tree6f26a1cd050780c0443f34a150777c37a1c74231
parent721b595744f199c185fbcefaa6e7e5cea9da1941
pwm: atmel: Fix duty cycle calculation in .get_state()

The CDTY register contains the number of inactive cycles. .apply() does
this correctly, however .get_state() got this wrong.

Fixes: 651b510a74d4 ("pwm: atmel: Implement .get_state()")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-atmel.c