Bug 218559 - STM32-PWM and PWM-LEDS suspend
Summary: STM32-PWM and PWM-LEDS suspend
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: ARM Linux
: P3 normal
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-05 08:50 UTC by Jakob
Modified: 2024-03-06 21:15 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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).

Note You need to log in before you can comment on or make changes to this bug.