Re: [PATCH v4 2/2] leds: turris-1x: Add support for CZ.NIC Turris 1.x LEDs
From: Josef Schlehofer
Date: Thu Nov 05 2026 - 13:54:38 EST
Hi Lee,
Thanks. v5 incorporates your style and driver name changes,
dev_ext_attribute, and the layout of brightness_set(). It also drops
led->on and the fixup. All includes are used, and string.h is new.
The global brightness files stay. Generic brightness is per LED, while
this is a single CPLD dimmer for the whole panel, similar to
device/brightness on Omnia. The level files expose the eight steps of
its button.
The reset flag also stays. The LED core reads LED_RETAIN_AT_SHUTDOWN
only during unregister and calls led_classdev_suspend() only on PM
suspend. At reboot, software triggers therefore keep writing after
.shutdown. Unregistering the LEDs in .shutdown, as leds-sun50i-a100
does, would also work. Let me know if you prefer that approach.
The devm ordering stays as well. A failed probe unwinds like an unbind,
with the LEDs released before the reset.
v5 also preserves a dim level set before activating the hardware
trigger, including across a colour change underneath it. This follows
the behaviour of leds-turris-omnia, which I used as the implementation
pattern.
Finally, scripts/checkpatch.pl reports only the 75-character warning
from your list on the mails I sent. It is on a URL line in the cover
letter.
Josef