linux-stable/drivers/pwm
Uwe Kleine-König 322b70b522 pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered
commit 3d2813fb17 upstream.

This fixes a race condition: After pwmchip_add() is called there might
already be a consumer and then modifying the hardware behind the
consumer's back is bad. So set the default before.

(Side-note: I don't know what this register setting actually does, if
this modifies the polarity there is an inconsistency because the
inversed polarity isn't considered if the PWM is already running during
.probe().)

Fixes: acfd92fdfb ("pwm: lpc32xx: Set PWM_PIN_LEVEL bit to default value")
Cc: Sylvain Lemieux <slemieux@tycoint.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-26 14:08:58 +02:00
..
core.c
Kconfig
Makefile
pwm-ab8500.c
pwm-atmel-hlcdc.c
pwm-atmel-tcb.c
pwm-atmel.c pwm: atmel: Fix duty cycle calculation in .get_state() 2021-05-19 10:13:04 +02:00
pwm-bcm-iproc.c
pwm-bcm-kona.c
pwm-bcm2835.c
pwm-berlin.c
pwm-brcmstb.c
pwm-clps711x.c
pwm-crc.c
pwm-cros-ec.c
pwm-ep93xx.c
pwm-fsl-ftm.c
pwm-hibvt.c
pwm-img.c pwm: img: Fix PM reference leak in img_pwm_enable() 2021-07-20 16:05:49 +02:00
pwm-imx-tpm.c
pwm-imx1.c pwm: imx1: Don't disable clocks at device remove time 2021-07-20 16:05:52 +02:00
pwm-imx27.c
pwm-iqs620a.c pwm: iqs620a: Fix overflow and optimize calculations 2021-03-04 11:38:17 +01:00
pwm-jz4740.c
pwm-lp3943.c
pwm-lpc18xx-sct.c
pwm-lpc32xx.c pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered 2021-09-26 14:08:58 +02:00
pwm-lpss-pci.c
pwm-lpss-platform.c
pwm-lpss.c
pwm-lpss.h
pwm-mediatek.c
pwm-meson.c
pwm-mtk-disp.c
pwm-mxs.c
pwm-omap-dmtimer.c
pwm-pca9685.c
pwm-pxa.c
pwm-rcar.c
pwm-renesas-tpu.c
pwm-rockchip.c pwm: rockchip: Eliminate potential race condition when probing 2021-03-04 11:38:11 +01:00
pwm-samsung.c
pwm-sifive.c
pwm-sl28cpld.c
pwm-spear.c pwm: spear: Don't modify HW state in .remove callback 2021-07-20 16:05:46 +02:00
pwm-sprd.c pwm: sprd: Ensure configuring period and duty_cycle isn't wrongly skipped 2021-07-28 14:35:34 +02:00
pwm-sti.c
pwm-stm32-lp.c
pwm-stm32.c
pwm-stmpe.c
pwm-sun4i.c
pwm-tegra.c pwm: tegra: Don't modify HW state in .remove callback 2021-07-20 16:05:49 +02:00
pwm-tiecap.c
pwm-tiehrpwm.c
pwm-twl-led.c
pwm-twl.c
pwm-vt8500.c
pwm-zx.c
sysfs.c