[PATCH] pwm: bcm2835: Make sure the channel is enabled after pwm_request()
Uwe Kleine-König
u.kleine-koenig at baylibre.com
Wed Nov 19 03:19:37 PST 2025
Hello,
On Tue, Nov 18, 2025 at 10:33:25AM -0800, Florian Fainelli wrote:
> On 11/18/2025 9:43 AM, Uwe Kleine-König wrote:
> > 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 at baylibre.com>
>
> Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
Thanks for your review.
I decided to not include it in my fixes PR for 6.18 that I just sent out
and so applied this patch on
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
for the next merge window. The problem is so old---it was introduced in
v3.19-rc1 more than 10 years ago when the driver was created---and the
change is not trivial enough for me to be completely confident to be
suitable that late in the development cycle.
Best regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20251119/a6e3d40e/attachment.sig>
More information about the linux-rpi-kernel
mailing list