From b26bc0b97d8d1b7454b7f7ab64f1bda8d1cd4002 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Mon, 6 Apr 2026 16:57:55 -0400 Subject: power: supply: max17042_battery: use ModelCfg refresh on max17055 Unlike other models, max17055 doesn't require cell characterization data and operates on a smaller set of input variables (`DesignCap`, `VEmpty`, `IChgTerm`, and `ModelCfg`). Those values can be filled in through `max17042_override_por_values()`, but the refresh bit has to be set afterward in order to make them apply. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Vincent Cloutier Link: https://patch.msgid.link/20260406205759.493288-8-vincent.cloutier@icloud.com Signed-off-by: Sebastian Reichel --- include/linux/power/max17042_battery.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/power') diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h index 25dccf908d20..13aeab1597c6 100644 --- a/include/linux/power/max17042_battery.h +++ b/include/linux/power/max17042_battery.h @@ -24,6 +24,8 @@ #define MAX17042_CHARACTERIZATION_DATA_SIZE 48 +#define MAX17055_MODELCFG_REFRESH_BIT BIT(15) + enum max17042_register { MAX17042_STATUS = 0x00, MAX17042_VALRT_Th = 0x01, @@ -219,6 +221,7 @@ struct max17042_config_data { u16 full_soc_thresh; /* 0x13 */ u16 design_cap; /* 0x18 */ u16 ichgt_term; /* 0x1E */ + u16 model_cfg; /* 0xDB */ /* MG3 config */ u16 at_rate; /* 0x04 */ -- cgit v1.2.3