summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorVincent Cloutier <vincent@cloutier.co>2026-07-26 21:13:05 -0400
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-07-27 20:32:38 +0200
commit6f384023851d67bd242bf40e5a91328eb92edb5d (patch)
tree594b8c9fbeba6bb1633cbac6711664d5cafa1851 /include/linux
parentfc9ff915b1fb6f6f826953d1bef3087d7a489d65 (diff)
power: supply: max17042_battery: Program MAX17055 EZ Config values
MAX17055 EZ Config requires DesignCap, dQAcc, IChgTerm, and dPAcc to be programmed coherently. Write each supplied stable register once, wait 1 ms, and verify its read-back instead of relying on the unchecked generic POR override path. Derive dPAcc from the effective DesignCap, dQAcc, and ModelCfg values so the accumulator matches the selected charge-voltage range. Propagate all read, write, verification, and range errors to the retrying init worker. Assisted-by: OpenCode:gpt-5.6-sol Signed-off-by: Vincent Cloutier <vincent@cloutier.co> Link: https://patch.msgid.link/20260727011319.621794-8-vincent.cloutier@icloud.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/power/max17042_battery.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h
index 13aeab1597c6..61af6fe2f4fe 100644
--- a/include/linux/power/max17042_battery.h
+++ b/include/linux/power/max17042_battery.h
@@ -25,6 +25,7 @@
#define MAX17042_CHARACTERIZATION_DATA_SIZE 48
#define MAX17055_MODELCFG_REFRESH_BIT BIT(15)
+#define MAX17055_MODELCFG_VCHG_BIT BIT(10)
enum max17042_register {
MAX17042_STATUS = 0x00,