Revert "power: supply: max17042_battery: Fix SOC threshold calc w/ no current sense"

This reverts commit 2c6ef025db.
This commit is contained in:
Ksawlii 2024-11-24 00:23:27 +01:00
parent 501def0b88
commit 3c3e49fe4c

View file

@ -851,10 +851,7 @@ static void max17042_set_soc_threshold(struct max17042_chip *chip, u16 off)
/* program interrupt thesholds such that we should
* get interrupt for every 'off' perc change in the soc
*/
if (chip->pdata->enable_current_sense)
regmap_read(map, MAX17042_RepSOC, &soc);
else
regmap_read(map, MAX17042_VFSOC, &soc);
regmap_read(map, MAX17042_RepSOC, &soc);
soc >>= 8;
soc_tr = (soc + off) << 8;
if (off < soc)