]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 3 Nov 2025 00:01:57 +0000 (01:01 +0100)
commit446fcf494691da4e685923e5fad02b163955fc0e
tree4b8f86de38417d3fc7612f03f916940b36e59ba8
parent8809980fdc8a86070667032fa4005ee83f1c62f3
power: supply: qcom_battmgr: support disabling charge control

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>
drivers/power/supply/qcom_battmgr.c