summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorManuel Fombuena <fombuena@outlook.com>2026-07-02 23:34:37 +0100
committerLee Jones <lee@kernel.org>2026-07-09 10:52:15 +0100
commit0767335233a8cbab00bbe260a4e4bd380c7677fd (patch)
tree213204bcf8da59653f20abe803d8c947c6772e56 /scripts
parent7cbe470366bdd43c7e8114fb2c4d74fa69093121 (diff)
downloadlinux-0767335233a8cbab00bbe260a4e4bd380c7677fd.tar.gz
linux-0767335233a8cbab00bbe260a4e4bd380c7677fd.zip
leds: st1202: Disable channel when brightness is set to zero
When brightness_set() is called with LED_OFF, only the ILED register is zeroed; the channel enable bit is left set from probe time. A hardware channel enabled with ILED=0 still draws a small residual current, causing a dim glow even when the LED is supposed to be off. Fix this by splitting st1202_channel_set() into a lockless inner function __st1202_channel_set() and a locking wrapper, then calling the inner function from brightness_set() while it already holds the mutex. The channel is now disabled when value is zero and re-enabled when non-zero, in the same lock region as the ILED write. Fixes: 259230378c65 ("leds: Add LED1202 I2C driver") Signed-off-by: Manuel Fombuena <fombuena@outlook.com> Assisted-by: Claude:claude-sonnet-4-6 Link: https://patch.msgid.link/GV1PR08MB8497F11B30FE7D74CAA25135C5F52@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions