pwm: sun4i: Remove erroneous else branch
stable inclusion from stable-5.10.4 commit 4b148744090bef856269f4cd1856f3d16ac9f276 bugzilla: 46903 -------------------------------- [ Upstream commit 6eefb79d ] Commit d3817a64 ("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: d3817a64 ("pwm: sun4i: Remove redundant needs_delay") Reported-by: NTaras Galchenko <tpgalchenko@gmail.com> Suggested-by: NTaras Galchenko <tpgalchenko@gmail.com> Tested-by: NTaras Galchenko <tpgalchenko@gmail.com> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录