Re: [PATCH RFC v3 02/11] leds: class: Remove hardware control trigger when writing brightness

[email protected] Sun, 19 Jul 2026 17:13:07 +0000
Newsgroups org.kernel.vger.linux-leds
Message-ID <[email protected]>
> Since commit b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of
> hardware controlled LED"), the brightness attribute becomes write-only
> when the LED is controlled fully by the hardware. A write-only attribute
> is very confusing.
> 
> Moreover, most LED drivers set hardware brightness innocently with the
> side effect of disabling hardware control, but the hardware control
> trigger remains active, resulting in the software and hardware being out
> of sync.
> 
> Fix it by removing the hardware control trigger when writing the
> brightness attribute.
> 
> This should also match the semantics of hardware control:
> 
>     When the LED is in hw control, no software blink is possible and
>     doing so will effectively disable hw control.
> 
> Fixes: b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of hardware controlled LED")
> Signed-off-by: Rong Zhang <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=2