diff options
| author | Manuel Fombuena <fombuena@outlook.com> | 2026-08-14 10:16:54 +0100 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2026-09-03 14:32:03 +0100 |
| commit | 35cbd34a6a05cc53882b1b7ca6f338a93ab29fcb (patch) | |
| tree | abda6ab8ec5755d7c1c4429310cb3bdf9ed2b4ee /scripts/Makefile.thinlto | |
| parent | cee9395acd8043be0644b25c34bfa86623f2b935 (diff) | |
| download | linux-next-35cbd34a6a05cc53882b1b7ca6f338a93ab29fcb.tar.gz linux-next-35cbd34a6a05cc53882b1b7ca6f338a93ab29fcb.zip | |
leds: st1202: Add hardware-accelerated blink support
Implement blink_set() to enable hardware-accelerated blinking via the
timer trigger. The LED1202 pattern engine is used to produce a two-step
sequence: full brightness for delay_on, off for delay_off, repeating
indefinitely.
Requested delays are clamped to the hardware range [22ms, 5610ms] then
rounded up to the nearest 22ms step. Clamping before rounding prevents
integer overflow in roundup() for extreme input values; since
ST1202_MILLIS_PATTERN_DUR_MAX is an exact multiple of
ST1202_MILLIS_PATTERN_DUR_MIN, rounding a clamped value cannot exceed
the maximum. A zero delay is replaced with the default of 500ms
independently for each of delay_on and delay_off.
The LED1202 pattern sequencer is global and its timing registers are
shared across all channels, so only one blink configuration can be
active at a time. Other active channels have their PWM slots zeroed for
both pattern steps so they remain dark rather than outputting unintended
values when the sequencer runs. The target channel's ILED register is
set to full brightness and the channel is enabled, since the timer
trigger deactivates the current trigger before calling blink_set which
would otherwise leave the channel disabled.
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Link: https://patch.msgid.link/GV1PR08MB84973F79E871176EB387C377C5DA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
