[PATCH] leds: tps6131x: increase overvoltage protection threshold to 6V
From: Matthias Fend
Date: Wed May 27 2026 - 07:08:11 EST
Currently, there may be cases where the overvoltage detection is triggered
even with a valid and generally functioning hardware setup. This occurs,
for example, when the input voltage exceeds the currently used overvoltage
threshold of 4.65V (typical). Since input voltages up to 5V are supported,
the threshold should be adjusted accordingly.
While the target output voltage setting has no effect on the LED operation
used here, it indirectly selects the threshold for overvoltage detection.
Set this to a value of 4.95V to select a threshold of 6V (typical).
Signed-off-by: Matthias Fend <matthias.fend@xxxxxxxxx>
---
drivers/leds/flash/leds-tps6131x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/leds/flash/leds-tps6131x.c b/drivers/leds/flash/leds-tps6131x.c
index f0f1f2b77d5a935cdca2f280b0197fb26bbf4bb4..5c9a5af5af05c5a6de1da3dd0f1badb946e9cde5 100644
--- a/drivers/leds/flash/leds-tps6131x.c
+++ b/drivers/leds/flash/leds-tps6131x.c
@@ -277,7 +277,7 @@ static int tps6131x_init_chip(struct tps6131x *tps6131x)
if (ret)
return ret;
- val = TPS6131X_REG_6_ENTS;
+ val = TPS6131X_REG_6_ENTS | (TPS6131X_OV_4950MV << TPS6131X_REG_6_OV_SHIFT);
ret = regmap_write(tps6131x->regmap, TPS6131X_REG_6, val);
if (ret)
---
base-commit: eb3f4b7426cfd2b79d65b7d37155480b32259a11
change-id: 20260527-leds-tps6131x-ovp-b98df9d9f61c
Best regards,
--
Matthias Fend <matthias.fend@xxxxxxxxx>