power: supply: ab8500_fg: Safeguard compensated voltage
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 29 Jan 2022 00:49:20 +0000 (01:49 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 19:24:53 +0000 (20:24 +0100)
commit965a990427b313a118865df1d33b82e30500c79a
tree98bb05dc9c9df96ca9ce3bce7d95f50efc600b29
parent673b50322bb6e31f0e917eeb321648092528635a
power: supply: ab8500_fg: Safeguard compensated voltage

In some cases when the platform is dissapating more than
500mA the voltage measurements and compensation will become
instable. Add a parameter to bail out of the voltage
measurement if this happens.

This code was found in a Samsung vendor tree.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_fg.c