]> git.ipfire.org Git - thirdparty/linux.git/commit
leds: expresswire: Fix chip state breakage
authorDuje Mihanović <duje@dujemihanovic.xyz>
Wed, 17 Dec 2025 18:14:23 +0000 (19:14 +0100)
committerLee Jones <lee@kernel.org>
Wed, 4 Feb 2026 09:20:27 +0000 (09:20 +0000)
commitf4b830a5371914239756b0599e5dc9d4c328e387
treeac32e6698c528a57df4a2d5ad176e595464495c5
parent393d56d437c65e4619cadab9f2347167cde99906
leds: expresswire: Fix chip state breakage

It is possible to put the KTD2801 chip in an unknown/undefined state by
changing the brightness very rapidly (for example, with a brightness
slider). When this happens, the brightness is stuck on max and cannot be
changed until the chip is power cycled.

Fix this by disabling interrupts while talking to the chip. While at it,
make expresswire_power_off() use fsleep() and also unexport some
functions meant to be internal.

Fixes: 1368d06dd2c9 ("leds: Introduce ExpressWire library")
Tested-by: Karel Balej <balejk@matfyz.cz>
Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
Link: https://patch.msgid.link/20251217-expresswire-fix-v2-1-4a02b10acd96@dujemihanovic.xyz
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-expresswire.c
include/linux/leds-expresswire.h