]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
power: supply: max17042: consider task period (max77759)
authorAndré Draszik <andre.draszik@linaro.org>
Mon, 2 Mar 2026 13:32:09 +0000 (13:32 +0000)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 3 Mar 2026 22:58:07 +0000 (23:58 +0100)
commit83a86e27c34d06ec2dc117fb293e80f78402df49
treef097e284d2a0b2db8f68b418b3d4efae443b299e
parent2864fb6aa947703d290b52b1b030b0b74d0a6128
power: supply: max17042: consider task period (max77759)

Several (register) values reported by the fuel gauge depend on its
internal task period and it needs to be taken into account when
calculating results. All relevant example formulas in the data sheet
assume the default task period (of 5760) and final results need to be
adjusted based on the task period in effect.

Update the code as and where necessary.

Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260302-max77759-fg-v3-10-3c5f01dbda23@linaro.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/max17042_battery.c
include/linux/power/max17042_battery.h