diff options
| author | Ondrej Jirman <[email protected]> | 2019-10-14 13:53:03 +0000 |
|---|---|---|
| committer | Thierry Reding <[email protected]> | 2019-10-21 14:50:02 +0000 |
| commit | 50cc7e3e4f26e3bf5ed74a8d061195c4d2161b8b (patch) | |
| tree | 47ecb80f39a78819c4755025532984af5d673628 /drivers/pwm/pwm-stm32.c | |
| parent | pwm: stm32: Add power management support (diff) | |
| download | kernel-50cc7e3e4f26e3bf5ed74a8d061195c4d2161b8b.tar.gz kernel-50cc7e3e4f26e3bf5ed74a8d061195c4d2161b8b.zip | |
pwm: sun4i: Fix incorrect calculation of duty_cycle/period
Since 5.4-rc1, pwm_apply_state calls ->get_state after ->apply
if available, and this revealed an issue with integer precision
when calculating duty_cycle and period for the currently set
state in ->get_state callback.
This issue manifested in broken backlight on several Allwinner
based devices.
Previously this worked, because ->apply updated the passed state
directly.
Fixes: deb9c462f4e53 ("pwm: sun4i: Don't update the state for the caller of pwm_apply_state")
Signed-off-by: Ondrej Jirman <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
0 files changed, 0 insertions, 0 deletions
