]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: ab8500: Swap max and overvoltage
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 29 Jan 2022 00:49:16 +0000 (01:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:58:06 +0000 (13:58 +0200)
commite3964cde51da406b1128ef0f738fa6227daa52fe
treebfbccb2f840ae62093bb16b20a09ec05fe3202e1
parent0ef004d1fae53c5d9fce03b463c4ce1f306e2779
power: supply: ab8500: Swap max and overvoltage

[ Upstream commit d662a7df36e1edc65eaf166ec1c8527ce9d088ea ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/ab8500_bmdata.c
drivers/power/supply/ab8500_chargalg.c
drivers/power/supply/ab8500_fg.c