]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pwm: bcm2835: Make sure the channel is enabled after pwm_request()
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Tue, 18 Nov 2025 17:43:02 +0000 (18:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:06 +0000 (14:03 +0100)
commitf4b45dc5eeb3d5ae3b80566692a27256ba707140
tree09b2c6a12eed5ebc0a5ee68bbfa5ea401795e2e5
parent1ade1edef373e87ba8d4e5dfe07fe420e77474a4
pwm: bcm2835: Make sure the channel is enabled after pwm_request()

[ Upstream commit cda323dbda76600bf9761970d58517648f0de67d ]

The .free callback cleared among others the enable bit PWENx in the
control register. When the PWM is requested later again this bit isn't
restored but the core assumes the PWM is enabled and thus skips a
request to configure the same state as before.

To fix that don't touch the hardware configuration in .free(). For
symmetry also drop .request() and configure the mode completely in
.apply().

Fixes: e5a06dc5ac1f ("pwm: Add BCM2835 PWM driver")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20251118174303.1761577-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pwm/pwm-bcm2835.c