]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: qcom_battmgr: support disabling charge control
authorVal Packett <val@packett.cool>
Sun, 12 Oct 2025 23:32:19 +0000 (20:32 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:48 +0000 (14:02 +0100)
commit69675b2d60416cbcc8de89e350124d0d33f8cae7
tree5288d5165b7131e0fa4619e406b08fdca2f0d393
parent2614ebcf2bca48e5f2b4ca1835870db4d1e65a0b
power: supply: qcom_battmgr: support disabling charge control

[ Upstream commit 446fcf494691da4e685923e5fad02b163955fc0e ]

Existing userspace (in particular, upower) disables charge control by
setting the start threshold to 0 and the stop threshold to 100.

Handle that by actually setting the enable bit to 0 when a start
threshold of 0 was requested.

Fixes: cc3e883a0625 ("power: supply: qcom_battmgr: Add charge control support")
Signed-off-by: Val Packett <val@packett.cool>
Link: https://patch.msgid.link/20251012233333.19144-4-val@packett.cool
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/qcom_battmgr.c