summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorLinus Walleij <linusw@kernel.org>2026-09-16 08:49:24 +0200
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-10-04 21:25:48 +0200
commit4d40dba1815d46c6ef9019ed80e3b998b0fc443d (patch)
tree2a1db6bae89abc1be5d8825530697a74e19a3bd0 /rust/kernel/alloc
parent16f506a13b58a55308449bbcbec89c817d619ca2 (diff)
power: supply: ab8500_fg: Report sub-percent charge changes
The fuel gauge updates bat_cap.mah from the coulomb counter but exposes bat_cap.prev_mah through CHARGE_NOW and ENERGY_NOW. It only refreshes prev_mah when the rounded integer capacity percentage changes, making the momentary properties appear frozen between percentage steps. Refresh prev_mah and notify userspace whenever the new charge remains within the currently accepted percentage. If a discharge estimate tries to cross upward into a higher percentage, the existing rejection still leaves both the reported percentage and charge unchanged. The AB8500 fuel-gauge implementations in the Samsung-GT-I8160-Codina, Samsung-GT-I8160_HD-Codina, Samsung-GT-I8530-Gavini, Samsung-GT-S7710-Skomer, Samsung-SGH-I407-Kyle and Samsung-SGH-T599-Codina-TMO product trees retain the same percentage-gated prev_mah update and contain no finer-grained reporting workaround. Fixes: 13151631b5bd ("ab8500-fg: A8500 fuel gauge driver") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260916-ab8500-charging-v1-2-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions