[PATCH 0/1] leds: st1202: add hardware-accelerated blink support
From: Manuel Fombuena
Date: Mon Jul 13 2026 - 11:18:56 EST
This patch adds blink_set() to the ST1202 LED driver, enabling
hardware-accelerated blinking via the timer trigger.
A series of nine fixes to the pattern engine and brightness handling
was recently applied to for-leds-next:
https://lore.kernel.org/all/GV1PR08MB8497C0B898789BB73ACE6EE3C5F52@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
With those fixes in place, the pattern engine can be used reliably to
implement blink_set(): a two-step pattern (full brightness for delay_on,
off for delay_off) is programmed and started in infinite repeat mode.
Requested delays are clamped to the hardware range and rounded up to
the nearest 22ms step.
During review of the fix series, several pre-existing issues were
identified in the driver — including brightness_set() being assigned to
a non-blocking callback, the global sequencer affecting all channels on
pattern operations, and missing brightness scaling in pattern_set().
These do not affect blink_set(): the callback is not invoked from atomic
context, the function explicitly programs all other channels' PWM slots
to zero before starting the sequencer, and channel brightness is set
directly via the ILED register. The pre-existing issues will be
addressed in a follow-up submission.
Tested on LED1202 hardware via I2C on a Linksys MX4200v2 router running
OpenWrt. Hardware blinking confirmed functional with the timer trigger.
Manuel Fombuena (1):
leds: st1202: add hardware-accelerated blink support
drivers/leds/leds-st1202.c | 82 ++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
--
2.55.0