power: supply: ab8500: Swap max and overvoltage
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 29 Jan 2022 00:49:16 +0000 (01:49 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 19:24:53 +0000 (20:24 +0100)
commitd662a7df36e1edc65eaf166ec1c8527ce9d088ea
treebbb46e0c8ad140ef166d7704081662de78e3227f
parentd58964be64f3bfc21fe8054dadbf4592cdd4e9c1
power: supply: ab8500: Swap max and overvoltage

We should terminate charging when we reach the voltage_max_design_uv
not overvoltage_limit_uv, this is an abuse of that struct member.

The overvoltage limit is actually not configurable on the AB8500,
it is fixed to 4.75 V so drop a comment about that in the code.

Fixes: 2a5f41830aad ("power: supply: ab8500: Standardize voltages")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_bmdata.c
drivers/power/supply/ab8500_chargalg.c
drivers/power/supply/ab8500_fg.c