]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: sun4i: Remove erroneous else branch
authorThierry Reding <thierry.reding@gmail.com>
Wed, 16 Dec 2020 17:33:55 +0000 (18:33 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 17 Dec 2020 13:23:49 +0000 (14:23 +0100)
commit1afef5a2972bef2cc61658da9e45a2530c348f05
tree3222cd457d1e233e2a0c90db6ed2a2e6e10f9985
parent944ed0b9e30e2575697dff31a1a77a8d829c0a4b
pwm: sun4i: Remove erroneous else branch

Commit 1e7800e4bc20 ("pwm: sun4i: Remove redundant needs_delay") changed
the logic of an else branch so that the PWM_EN and PWM_CLK_GATING bits
are now cleared if the PWM is to be disabled, whereas previously the
condition was always false, and hence the branch never got executed.

This code is reported causing backlight issues on boards based on the
Allwinner A20 SoC. Fix this by removing the else branch, which restores
the behaviour prior to the offending commit.

Note that the PWM_EN and PWM_CLK_GATING bits still get cleared later in
sun4i_pwm_apply() if the PWM is to be disabled.

Fixes: 1e7800e4bc20 ("pwm: sun4i: Remove redundant needs_delay")
Reported-by: Taras Galchenko <tpgalchenko@gmail.com>
Suggested-by: Taras Galchenko <tpgalchenko@gmail.com>
Tested-by: Taras Galchenko <tpgalchenko@gmail.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-sun4i.c