diff options
| author | Linus Walleij <linusw@kernel.org> | 2026-09-16 08:49:28 +0200 |
|---|---|---|
| committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2026-10-04 21:25:48 +0200 |
| commit | 3b33eda4067494658d51db0792377fef98787e3f (patch) | |
| tree | 4883d6cc45c262859bbf2fb9586c61ca9f5bbe47 | |
| parent | 95990cda8e42dda4bd3f1475d578323981bd8579 (diff) | |
power: supply: ab8500: Preserve battery termination current
The battery-info parser uses a negative value for an unspecified
termination current. Testing the value as a boolean instead replaces
every valid positive current from the battery description with 200 mA.
Apply the default only when the property is unspecified so batteries
retain their described charging termination current.
Fixes: 9c20899da46b ("power: supply: ab8500: Standardize termination current")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260916-ab8500-charging-v1-6-e986ed321cc6@kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
| -rw-r--r-- | drivers/power/supply/ab8500_bmdata.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/ab8500_bmdata.c b/drivers/power/supply/ab8500_bmdata.c index d7fd2d313ff1..0f04893d6bf9 100644 --- a/drivers/power/supply/ab8500_bmdata.c +++ b/drivers/power/supply/ab8500_bmdata.c @@ -173,7 +173,7 @@ int ab8500_bm_of_probe(struct power_supply *psy, if (bi->constant_charge_voltage_max_uv < 0) bi->constant_charge_voltage_max_uv = 4100000; - if (bi->charge_term_current_ua) + if (bi->charge_term_current_ua < 0) /* Charging stops when we drop below this current */ bi->charge_term_current_ua = 200000; |
