]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: ab8500_charger: Fix VBAT interval check
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 29 Jan 2022 00:49:25 +0000 (01:49 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 19:24:54 +0000 (20:24 +0100)
commit9aab1ca4efa3b4c07f4fd09b683287bc742441a0
treef0d7f8f774ab7a4cd20a2090ddaeec68001bb9be
parent3cd58dda39cdbff995291570b2a0237e82de771d
power: supply: ab8500_charger: Fix VBAT interval check

When using USB charging, the AB8500 charger is periodically
checking VBAT for a threshold at 3.8V.

This crashes badly, as the class_for_each_device() was passed
the wrong argument. I think this has maybe worked by chance
in the past because of how the structs were arranged but it
is leading to crashes now.

Fix this up and also switch to using microvolts for the
voltages like the rest of the code.

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