Re: (subset) [PATCH v2] leds: pwm: Fix active-low brightness with default-state keep
From: Lee Jones
Date: Thu Nov 26 2026 - 13:34:30 EST
On Thu, 19 Nov 2026 10:33:51 +0800, raoxu wrote:
> With default-state set to "keep", led_pwm_add() derives the initial
> brightness from the PWM duty cycle without accounting for active-low
> LEDs. However, led_pwm_set() inverts the duty cycle for these LEDs.
>
> For an enabled active-low PWM, zero duty corresponds to maximum LED
> brightness, while full duty corresponds to off. The current calculation
> reports the opposite values. This exposes an incorrect cached brightness
> to userspace and can restore the wrong value after suspend. With an
> optional enable GPIO, the cached brightness also determines the initial
> GPIO value.
>
> [...]
Applied, thanks!
[1/1] leds: pwm: Fix active-low brightness with default-state keep
commit: 81cc7da655d64d452c1346f1cf33ebe78dcf3ec7
--
Lee Jones [李琼斯]