leds: tps6131x: Increase overvoltage protection threshold to 6V

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@emfend.at>
Link: https://patch.msgid.link/20260527-leds-tps6131x-ovp-v1-1-1ac70d03c9eb@emfend.at
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Matthias Fend 2026-05-27 12:26:51 +02:00 committed by Lee Jones
parent 938fda9671
commit d43f1d7929

View File

@ -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)