summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDuje Mihanović <duje@dujemihanovic.xyz>2025-12-17 19:14:23 +0100
committerLee Jones <lee@kernel.org>2026-02-04 09:20:27 +0000
commitf4b830a5371914239756b0599e5dc9d4c328e387 (patch)
treeac32e6698c528a57df4a2d5ad176e595464495c5 /include
parent393d56d437c65e4619cadab9f2347167cde99906 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/leds-expresswire.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/leds-expresswire.h b/include/linux/leds-expresswire.h
index a422921f4159..7f8c4795f69f 100644
--- a/include/linux/leds-expresswire.h
+++ b/include/linux/leds-expresswire.h
@@ -30,9 +30,6 @@ struct expresswire_common_props {
void expresswire_power_off(struct expresswire_common_props *props);
void expresswire_enable(struct expresswire_common_props *props);
-void expresswire_start(struct expresswire_common_props *props);
-void expresswire_end(struct expresswire_common_props *props);
-void expresswire_set_bit(struct expresswire_common_props *props, bool bit);
void expresswire_write_u8(struct expresswire_common_props *props, u8 val);
#endif /* _LEDS_EXPRESSWIRE_H */