linux-stable/drivers/pwm
Thierry Reding 4b14874409 pwm: sun4i: Remove erroneous else branch
[ Upstream commit 6eefb79d6f ]

Commit d3817a6470 ("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: d3817a6470 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:53:59 +01:00
..
core.c pwm: Convert to use DEFINE_SEQ_ATTRIBUTE macro 2020-09-24 09:18:09 +02:00
Kconfig ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
Makefile pwm: Add support for sl28cpld PWM controller 2020-09-17 15:59:34 +01:00
pwm-ab8500.c
pwm-atmel-hlcdc.c
pwm-atmel-tcb.c
pwm-atmel.c
pwm-bcm-iproc.c pwm: bcm-iproc: handle clk_get_rate() return 2020-07-30 11:27:13 +02:00
pwm-bcm-kona.c pwm: bcm-kona: Remove impossible comparison when validating duty cycle 2020-07-30 11:27:12 +02:00
pwm-bcm2835.c pwm: bcm2835: Simplify with dev_err_probe() 2020-09-24 09:18:10 +02:00
pwm-berlin.c
pwm-brcmstb.c
pwm-clps711x.c pwm: clps711x: Use 64-bit division macro 2020-06-16 11:16:08 +02:00
pwm-crc.c pwm: crc: Implement get_state() method 2020-09-06 15:38:05 +02:00
pwm-cros-ec.c pwm: cros-ec: Simplify EC error handling 2020-08-24 11:37:34 +02:00
pwm-ep93xx.c
pwm-fsl-ftm.c
pwm-hibvt.c
pwm-img.c pwm: img: Fix null pointer access in probe 2020-09-24 09:18:13 +02:00
pwm-imx-tpm.c pwm: imx-tpm: Use 64-bit division macro 2020-06-16 11:16:08 +02:00
pwm-imx1.c
pwm-imx27.c pwm: imx27: Fix overflow for bigger periods 2020-12-30 11:53:59 +01:00
pwm-iqs620a.c pwm: iqs620a: Use lowercase hexadecimal literals for consistency 2020-06-17 20:42:59 +02:00
pwm-jz4740.c pwm: jz4740: Simplify with dev_err_probe() 2020-09-24 09:18:10 +02:00
pwm-lp3943.c pwm: lp3943: Dynamically allocate PWM chip base 2020-12-30 11:53:59 +01:00
pwm-lpc18xx-sct.c
pwm-lpc32xx.c
pwm-lpss-pci.c
pwm-lpss-platform.c pwm: lpss: Remove suspend/resume handlers 2020-09-06 15:38:01 +02:00
pwm-lpss.c pwm: lpss: Remove suspend/resume handlers 2020-09-06 15:38:01 +02:00
pwm-lpss.h pwm: lpss: Remove suspend/resume handlers 2020-09-06 15:38:01 +02:00
pwm-mediatek.c pwm: mediatek: Provide missing kerneldoc description for 'soc' arg 2020-07-30 11:27:12 +02:00
pwm-meson.c
pwm-mtk-disp.c
pwm-mxs.c
pwm-omap-dmtimer.c pwm: Replace HTTP links with HTTPS ones 2020-07-30 11:27:13 +02:00
pwm-pca9685.c pwm: pca9685: Disable unused alternative addresses 2020-09-24 09:18:13 +02:00
pwm-pxa.c
pwm-rcar.c
pwm-renesas-tpu.c
pwm-rockchip.c pwm: rockchip: Simplify with dev_err_probe() 2020-09-24 09:18:10 +02:00
pwm-samsung.c
pwm-sifive.c pwm: sifive: Simplify with dev_err_probe() 2020-09-24 09:18:11 +02:00
pwm-sl28cpld.c pwm: sl28cpld: fix getting driver data in pwm callbacks 2020-12-03 09:57:37 -08:00
pwm-spear.c
pwm-sprd.c pwm: sprd: Simplify with dev_err_probe() 2020-09-24 09:18:11 +02:00
pwm-sti.c
pwm-stm32-lp.c pwm: Convert period and duty cycle to u64 2020-06-17 20:42:11 +02:00
pwm-stm32.c
pwm-stmpe.c
pwm-sun4i.c pwm: sun4i: Remove erroneous else branch 2020-12-30 11:53:59 +01:00
pwm-tegra.c
pwm-tiecap.c pwm: Replace HTTP links with HTTPS ones 2020-07-30 11:27:13 +02:00
pwm-tiehrpwm.c pwm: Replace HTTP links with HTTPS ones 2020-07-30 11:27:13 +02:00
pwm-twl-led.c
pwm-twl.c
pwm-vt8500.c
pwm-zx.c pwm: zx: Add missing cleanup in error path 2020-12-30 11:53:58 +01:00
sysfs.c pwm: Allow store 64-bit duty cycle from sysfs interface 2020-09-24 09:18:14 +02:00