Bug 218559

Summary: STM32-PWM and PWM-LEDS suspend
Product: Drivers Reporter: Jakob (jakob+kernelorg)
Component: OtherAssignee: drivers_other
Status: NEW ---    
Severity: normal CC: regressions, ukleinek
Priority: P3    
Hardware: ARM   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Jakob 2024-03-05 08:50:53 UTC
Hi!

Commit 76fe464c8e64e71b2e4af11edeef0e5d85eeb6aa ("leds: pwm: Don't disable the PWM when the LED should be off") prevents stm32mp1xx based targets from entering suspend if pwm-leds exist, as the stm32 PWM driver refuses to enter suspend if any PWM channels are still active ("PWM 0 still in use by consumer" see stm32_pwm_suspend in drivers/pwm/stm32-pwm.c).

Reverting the mentioned commit fixes this behaviour but I'm not certain if this is a problem with stm32-pwm or pwm-leds (what is the usual behaviour for suspend with active PWM channels?).

- Jakob
Comment 1 The Linux kernel's regression tracker (Thorsten Leemhuis) 2024-03-06 07:06:54 UTC
Forwarded by mail: https://lore.kernel.org/regressions/5da6cf8a-4250-42f6-8b39-13bff7fcdd9c@leemhuis.info/
Comment 2 Uwe Kleine-König 2024-03-06 08:22:48 UTC
See https://lore.kernel.org/linux-leds/2vbwacjy25z5vekylle3ehwi3be4urm6bssrbg6bxobtdlekt4@mazicwtgf4qb
for an (untested) fix.
Comment 3 Jakob 2024-03-06 21:15:29 UTC
Thank you for the quick fix!
Seems to be working fine - at least on my specific hardware (STM32MP157).