diff options
| author | André Draszik <andre.draszik@linaro.org> | 2026-03-02 13:32:09 +0000 |
|---|---|---|
| committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2026-03-03 23:58:07 +0100 |
| commit | 83a86e27c34d06ec2dc117fb293e80f78402df49 (patch) | |
| tree | f097e284d2a0b2db8f68b418b3d4efae443b299e /include/linux/power | |
| parent | 2864fb6aa947703d290b52b1b030b0b74d0a6128 (diff) | |
| download | lwn-83a86e27c34d06ec2dc117fb293e80f78402df49.tar.gz lwn-83a86e27c34d06ec2dc117fb293e80f78402df49.zip | |
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>
Diffstat (limited to 'include/linux/power')
| -rw-r--r-- | include/linux/power/max17042_battery.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h index 05097f08ea36..d5b08313cf11 100644 --- a/include/linux/power/max17042_battery.h +++ b/include/linux/power/max17042_battery.h @@ -17,6 +17,7 @@ #define MAX17042_DEFAULT_VMAX (4500) /* LiHV cell max */ #define MAX17042_DEFAULT_TEMP_MIN (0) /* For sys without temp sensor */ #define MAX17042_DEFAULT_TEMP_MAX (700) /* 70 degrees Celcius */ +#define MAX17042_DEFAULT_TASK_PERIOD (5760) /* Consider RepCap which is less then 10 units below FullCAP full */ #define MAX17042_FULL_THRESHOLD 10 |
