summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorManuel Fombuena <fombuena@outlook.com>2026-09-15 13:44:38 +0100
committerLee Jones <lee@kernel.org>2026-09-22 14:26:03 +0100
commit119a7d375e5caedaf252198fa64e7df5d7269ab4 (patch)
tree7be4aceab9bf23d9c7b0756028ad1d4f43654374 /tools/lib/python/kdoc
parent38f98583bcac95a65774b73cbcc56280a71f5612 (diff)
leds: st1202: Clear unused pattern slots in pattern_set()
The pattern duration registers are chip-wide while the PWM registers are per-channel, so a channel can end up driven by a sequencer timeline it never programmed. st1202_led_pattern_set() programs only the first len slots. The pattern trigger calls pattern_clear() before pattern_set() only once a channel is already in PATTERN_TYPE_HW mode, and activating the trigger resets that mode, so the first hardware pattern written after every activation skips it. If another channel has already programmed a longer pattern, durations [len, 8) are still set, and this channel's PWM for those slots holds whatever was last written there. That used to be LED_OFF, so a channel stayed dark for the slots it had not programmed itself. Since commit d2ca0e2b6d64 ("leds: st1202: Set all pattern PWM slots to full after clearing pattern") pattern_clear() leaves ST1202_PATTERN_PWM_FULL there, and so does the brightness path since commit 7cbe470366bd ("leds: st1202: Fix brightness having no effect while pattern mode is active"). The channel now plays its own steps and then sits at full brightness for the rest of the sequence. Zero this channel's PWM for the unused slots so it stays dark for the remainder of the timeline, as st1202_blink_set() already does for the channels it is not driving. The duration registers are deliberately left alone. All twelve channels share them, so clearing them would truncate a longer pattern still running elsewhere on the same device. A channel whose pattern is shorter than the active timeline therefore keeps the longer period; that follows from having a single hardware sequencer and is not something this can correct. Fixes: d2ca0e2b6d64 ("leds: st1202: Set all pattern PWM slots to full after clearing pattern") Signed-off-by: Manuel Fombuena <fombuena@outlook.com> Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB8497E9939E3C0D68401659D0C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions