linux/drivers/pwm
Thierry Reding 6eefb79d6f pwm: sun4i: Remove erroneous else branch
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>
2020-12-17 14:23:49 +01:00
..
core.c pwm: core: Use octal permission 2020-12-17 14:19:00 +01:00
Kconfig pwm: lpss: Make compilable with COMPILE_TEST 2020-12-17 14:19:00 +01:00
Makefile pwm: Add PWM fan controller driver for LGM SoC 2020-12-17 14:18:59 +01:00
pwm-ab8500.c pwm: ab8500: Explicitly allocate pwm chip base dynamically 2020-12-17 14:18:48 +01:00
pwm-atmel-hlcdc.c pwm: Ensure pwm_apply_state() doesn't modify the state argument 2019-09-21 03:25:10 +02:00
pwm-atmel-tcb.c pwm: atmel-tcb: Add sama5d2 support 2020-12-17 14:18:55 +01:00
pwm-atmel.c pwm: atmel: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:46 +01:00
pwm-bcm2835.c pwm: bcm2835: Support apply function for atomic configuration 2020-12-17 14:19:01 +01:00
pwm-bcm-iproc.c pwm: bcm-iproc: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:42 +01:00
pwm-bcm-kona.c pwm: bcm-kona: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:41 +01:00
pwm-berlin.c pwm: berlin: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:44 +01:00
pwm-brcmstb.c pwm: brcmstb: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:44 +01:00
pwm-clps711x.c pwm: clps711x: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:45 +01:00
pwm-crc.c pwm: Use -EINVAL for unsupported polarity 2020-12-17 14:18:59 +01:00
pwm-cros-ec.c pwm: cros-ec: Simplify EC error handling 2020-08-24 11:37:34 +02:00
pwm-dwc.c pwm: Add DesignWare PWM Controller Driver 2020-12-17 14:18:58 +01:00
pwm-ep93xx.c pwm: ep93xx: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:39 +01:00
pwm-fsl-ftm.c pwm: fsl-ftm: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:38 +01:00
pwm-hibvt.c pwm: hibvt: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:46 +01:00
pwm-img.c pwm: img: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:45 +01:00
pwm-imx1.c pwm: imx1: Use dev_err_probe() to simplify error handling 2020-12-17 14:18:47 +01:00
pwm-imx27.c pwm: imx27: Fix overflow for bigger periods 2020-12-17 14:19:01 +01:00
pwm-imx-tpm.c pwm: imx-tpm: Use dev_err_probe() to simplify error handling 2020-12-17 14:18:47 +01:00
pwm-intel-lgm.c pwm: Add PWM fan controller driver for LGM SoC 2020-12-17 14:18:59 +01:00
pwm-iqs620a.c pwm: Use -EINVAL for unsupported polarity 2020-12-17 14:18:59 +01:00
pwm-jz4740.c pwm: jz4740: Simplify with dev_err_probe() 2020-09-24 09:18:10 +02:00
pwm-keembay.c pwm: keembay: Fix build failure with -Os 2020-12-17 14:19:00 +01:00
pwm-lp3943.c pwm: lp3943: Dynamically allocate PWM chip base 2020-12-17 14:18:55 +01:00
pwm-lpc18xx-sct.c pwm: lpc18xx-sct: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:46 +01:00
pwm-lpc32xx.c pwm: lpc32xx: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:42 +01:00
pwm-lpss-pci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pwm-lpss-platform.c pwm: lpss: Set DPM_FLAG_SMART_SUSPEND on Cherry Trail devices 2020-12-17 14:18:49 +01:00
pwm-lpss.c pwm: lpss: Log error from pwm_lpss_is_updating() if the update bit is still set 2020-12-17 14:18:48 +01:00
pwm-lpss.h pwm: lpss: Remove suspend/resume handlers 2020-09-06 15:38:01 +02:00
pwm-mediatek.c pwm: mediatek: Add MT8183 SoC support 2020-12-17 14:18:58 +01:00
pwm-meson.c pwm: meson: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:42 +01:00
pwm-mtk-disp.c pwm: mtk-disp: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:44 +01:00
pwm-mxs.c pwm: mxs: Remove unused include of of_address.h 2020-03-30 16:55:27 +02:00
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: pxa: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:40 +01:00
pwm-rcar.c pwm: Use -EINVAL for unsupported polarity 2020-12-17 14:18:59 +01:00
pwm-renesas-tpu.c pwm: renesas-tpu: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:38 +01:00
pwm-rockchip.c pwm: rockchip: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:42 +01:00
pwm-samsung.c pwm: samsung: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:43 +01:00
pwm-sifive.c pwm: sifive: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:46 +01:00
pwm-sl28cpld.c pwm: sl28cpld: Set driver data before registering the PWM chip 2020-12-17 14:19:02 +01:00
pwm-spear.c pwm: spear: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:41 +01:00
pwm-sprd.c pwm: sprd: Simplify with dev_err_probe() 2020-09-24 09:18:11 +02:00
pwm-sti.c pwm: sti: Remove unnecessary blank line 2020-12-17 14:18:59 +01:00
pwm-stm32-lp.c pwm: Convert period and duty cycle to u64 2020-06-17 20:42:11 +02:00
pwm-stm32.c pwm: stm32: Remove automatic output enable 2020-01-20 13:47:36 +01:00
pwm-stmpe.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pwm-sun4i.c pwm: sun4i: Remove erroneous else branch 2020-12-17 14:23:49 +01:00
pwm-tegra.c pwm: tegra: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:39 +01:00
pwm-tiecap.c pwm: tiecap: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:44 +01:00
pwm-tiehrpwm.c pwm: tiehrpwm: Handle deferred probe with dev_err_probe() 2020-12-17 14:18:49 +01:00
pwm-twl-led.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
pwm-twl.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
pwm-vt8500.c pwm: vt8500: Convert to devm_platform_ioremap_resource() 2020-12-17 14:18:44 +01:00
pwm-zx.c pwm: zx: Add missing cleanup in error path 2020-12-17 14:18:48 +01:00
sysfs.c pwm: Allow store 64-bit duty cycle from sysfs interface 2020-09-24 09:18:14 +02:00