summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Marheine <pmarheine@chromium.org>2022-11-14 13:13:50 +1100
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-29 01:05:08 +0000
commit57b32569630025bea009a13fc46d1354debe3fdc (patch)
tree8ceba06e674bbbcd60575e392b109d122e379c68
parent1497d466220fc32f5d857883c4902a43c394059c (diff)
downloadchrome-ec-57b32569630025bea009a13fc46d1354debe3fdc.tar.gz
Rename CONFIG_CHARGER_INPUT_CURRENT to _CHARGER_DEFAULT_CURRENT_LIMIT
"Default input current" is not a very clear name, so rename this option to better express its use as a default value that is set in the charger. This is made possible by splitting other uses into CHARGER_MIN_INPUT_CURRENT_LIMIT, making the only use for CHARGER_INPUT_CURRENT be as a default. BUG=b:163093572 TEST=make buildall; zmake build -a BRANCH=none LOW_COVERAGE_REASON=isl9241 and sm5803 currently lack emulators Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ia9c1df9061825b15477466e85343afeb2a371288 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4025404 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--baseboard/asurada/baseboard.h2
-rw-r--r--baseboard/brya/baseboard.h2
-rw-r--r--baseboard/cherry/baseboard.h2
-rw-r--r--baseboard/dedede/baseboard.h2
-rw-r--r--baseboard/goroh/baseboard.h2
-rw-r--r--baseboard/grunt/baseboard.h2
-rw-r--r--baseboard/guybrush/baseboard.h2
-rw-r--r--baseboard/hatch/baseboard.h3
-rw-r--r--baseboard/herobrine/baseboard.h2
-rw-r--r--baseboard/intelrvp/baseboard.h2
-rw-r--r--baseboard/kukui/baseboard.h2
-rw-r--r--baseboard/kukui/charger_mt6370.c3
-rw-r--r--baseboard/octopus/baseboard.h3
-rw-r--r--baseboard/trogdor/baseboard.h2
-rw-r--r--baseboard/volteer/baseboard.h2
-rw-r--r--baseboard/zork/baseboard.h2
-rw-r--r--board/atlas/board.h2
-rw-r--r--board/casta/board.c3
-rw-r--r--board/coral/board.h2
-rw-r--r--board/elm/board.h2
-rw-r--r--board/eve/board.h2
-rw-r--r--board/hammer/board.h2
-rw-r--r--board/host/charger.c3
-rw-r--r--board/mchpevb1/board.h2
-rw-r--r--board/nami/board.h2
-rw-r--r--board/nautilus/board.h2
-rw-r--r--board/nocturne/board.h2
-rw-r--r--board/oak/board.h2
-rw-r--r--board/poppy/board.h2
-rw-r--r--board/rammus/board.h2
-rw-r--r--board/reef/board.h2
-rw-r--r--board/reef_it8320/board.h2
-rw-r--r--board/reef_mchp/board.h2
-rw-r--r--board/scarlet/board.h2
-rw-r--r--common/charge_manager.c4
-rw-r--r--common/charge_state_v2.c4
-rw-r--r--common/ec_ec_comm_server.c5
-rw-r--r--docs/low_battery_startup.md24
-rw-r--r--driver/charger/bd9995x.c11
-rw-r--r--driver/charger/bq24715.c4
-rw-r--r--driver/charger/isl923x.c2
-rw-r--r--driver/charger/isl9241.c4
-rw-r--r--driver/charger/sm5803.c2
-rw-r--r--include/config.h9
-rw-r--r--test/test_config.h4
-rw-r--r--zephyr/Kconfig.usbc10
-rw-r--r--zephyr/program/rex/prj.conf2
-rw-r--r--zephyr/program/skyrim/prj.conf2
-rw-r--r--zephyr/shim/include/config_chip.h7
-rw-r--r--zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201.c4
-rw-r--r--zephyr/test/drivers/common_charger/src/test_common_charger.c2
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c4
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c4
-rw-r--r--zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c4
-rw-r--r--zephyr/test/drivers/default/src/isl923x.c4
55 files changed, 99 insertions, 90 deletions
diff --git a/baseboard/asurada/baseboard.h b/baseboard/asurada/baseboard.h
index 597515363c..a8b62ccf59 100644
--- a/baseboard/asurada/baseboard.h
+++ b/baseboard/asurada/baseboard.h
@@ -60,7 +60,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGE_RAMP_HW
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_ISL9238C
#define CONFIG_CHARGER_MAINTAIN_VBAT
diff --git a/baseboard/brya/baseboard.h b/baseboard/brya/baseboard.h
index b2d722fcd9..b4ba8f2d16 100644
--- a/baseboard/brya/baseboard.h
+++ b/baseboard/brya/baseboard.h
@@ -68,7 +68,7 @@
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CMD_CHARGER_DUMP
diff --git a/baseboard/cherry/baseboard.h b/baseboard/cherry/baseboard.h
index 8cd2aacd1f..cfc1425d57 100644
--- a/baseboard/cherry/baseboard.h
+++ b/baseboard/cherry/baseboard.h
@@ -70,7 +70,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGE_RAMP_HW
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_ISL9238C
#define CONFIG_CHARGER_MAINTAIN_VBAT
diff --git a/baseboard/dedede/baseboard.h b/baseboard/dedede/baseboard.h
index e03d41ae21..ba83b44375 100644
--- a/baseboard/dedede/baseboard.h
+++ b/baseboard/dedede/baseboard.h
@@ -164,7 +164,7 @@
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 256
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 256
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 256
#define CONFIG_USB_CHARGER
#define CONFIG_TRICKLE_CHARGING
diff --git a/baseboard/goroh/baseboard.h b/baseboard/goroh/baseboard.h
index 205621e040..594686f0bf 100644
--- a/baseboard/goroh/baseboard.h
+++ b/baseboard/goroh/baseboard.h
@@ -57,7 +57,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGE_RAMP_HW
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_ISL9238C
#define CONFIG_CHARGER_MAINTAIN_VBAT
diff --git a/baseboard/grunt/baseboard.h b/baseboard/grunt/baseboard.h
index b9ddd32861..bdbec1e0d2 100644
--- a/baseboard/grunt/baseboard.h
+++ b/baseboard/grunt/baseboard.h
@@ -72,7 +72,7 @@
*
* See also b/111214767
*/
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT 5
#define CONFIG_CHARGER_ISL9238
diff --git a/baseboard/guybrush/baseboard.h b/baseboard/guybrush/baseboard.h
index 883bf27847..e5223abfbe 100644
--- a/baseboard/guybrush/baseboard.h
+++ b/baseboard/guybrush/baseboard.h
@@ -162,7 +162,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_ISL9241
#define CONFIG_CHARGER_SENSE_RESISTOR 10
diff --git a/baseboard/hatch/baseboard.h b/baseboard/hatch/baseboard.h
index 9ba148e91e..4aee5200de 100644
--- a/baseboard/hatch/baseboard.h
+++ b/baseboard/hatch/baseboard.h
@@ -96,7 +96,8 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_BQ25710
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512 /* Allow low-current USB charging */
+/* Allow low-current USB charging */
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#undef CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 1
diff --git a/baseboard/herobrine/baseboard.h b/baseboard/herobrine/baseboard.h
index b1aabc6bd6..72b8b02b04 100644
--- a/baseboard/herobrine/baseboard.h
+++ b/baseboard/herobrine/baseboard.h
@@ -88,7 +88,7 @@
#define CONFIG_CHARGER_PSYS_READ
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 10000
#define CONFIG_CHARGER_SENSE_RESISTOR 10
diff --git a/baseboard/intelrvp/baseboard.h b/baseboard/intelrvp/baseboard.h
index 96acf8c562..e47434c4af 100644
--- a/baseboard/intelrvp/baseboard.h
+++ b/baseboard/intelrvp/baseboard.h
@@ -68,7 +68,7 @@
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_SENSE_RESISTOR 5
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10
diff --git a/baseboard/kukui/baseboard.h b/baseboard/kukui/baseboard.h
index 4a5562fb04..6cb18b0d4e 100644
--- a/baseboard/kukui/baseboard.h
+++ b/baseboard/kukui/baseboard.h
@@ -196,7 +196,7 @@
#define CONFIG_VBOOT_HASH
#define CONFIG_CHARGER
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 2
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 15000
#define CONFIG_CHARGER_DISCHARGE_ON_AC
diff --git a/baseboard/kukui/charger_mt6370.c b/baseboard/kukui/charger_mt6370.c
index eb94397fdb..80587745ea 100644
--- a/baseboard/kukui/charger_mt6370.c
+++ b/baseboard/kukui/charger_mt6370.c
@@ -77,7 +77,8 @@ int board_cut_off_battery(void)
static void board_set_charge_limit_throttle(int charge_ma, int charge_mv)
{
charge_set_input_current_limit(
- MIN(throttled_ma, MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT)),
+ MIN(throttled_ma,
+ MAX(charge_ma, CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT)),
charge_mv);
}
diff --git a/baseboard/octopus/baseboard.h b/baseboard/octopus/baseboard.h
index 9c6e2a14e6..42093ab771 100644
--- a/baseboard/octopus/baseboard.h
+++ b/baseboard/octopus/baseboard.h
@@ -154,7 +154,8 @@
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGE_RAMP_HW
#define CONFIG_CHARGER
-#define CONFIG_CHARGER_INPUT_CURRENT 512 /* Allow low-current USB charging */
+/* Allow low-current USB charging */
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_SENSE_RESISTOR 10
#define CONFIG_CHARGER_DISCHARGE_ON_AC
diff --git a/baseboard/trogdor/baseboard.h b/baseboard/trogdor/baseboard.h
index 901466fec1..28cf467272 100644
--- a/baseboard/trogdor/baseboard.h
+++ b/baseboard/trogdor/baseboard.h
@@ -92,7 +92,7 @@
#define CONFIG_CHARGER_PSYS_READ
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 10000
#define CONFIG_CHARGER_SENSE_RESISTOR 10
diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h
index 4df7d5fc73..d3c82f0651 100644
--- a/baseboard/volteer/baseboard.h
+++ b/baseboard/volteer/baseboard.h
@@ -107,7 +107,7 @@
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
/*
diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h
index 5af8f254a0..c55ca12c76 100644
--- a/baseboard/zork/baseboard.h
+++ b/baseboard/zork/baseboard.h
@@ -76,7 +76,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_ISL9241
#define CONFIG_CHARGER_SENSE_RESISTOR 10
diff --git a/board/atlas/board.h b/board/atlas/board.h
index f5cef8d582..3dbce640bb 100644
--- a/board/atlas/board.h
+++ b/board/atlas/board.h
@@ -77,7 +77,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_ISL9238
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT 5
#define CONFIG_CHARGER_PROFILE_OVERRIDE
diff --git a/board/casta/board.c b/board/casta/board.c
index 512a7c224b..2ae65c7d86 100644
--- a/board/casta/board.c
+++ b/board/casta/board.c
@@ -172,7 +172,8 @@ static void set_input_limit_on_ac_removal(void)
if (get_cbi_ssfc_charger() != SSFC_CHARGER_BQ25710)
return;
- charger_set_input_current_limit(0, CONFIG_CHARGER_INPUT_CURRENT);
+ charger_set_input_current_limit(0,
+ CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT);
}
DECLARE_HOOK(HOOK_AC_CHANGE, set_input_limit_on_ac_removal, HOOK_PRIO_DEFAULT);
diff --git a/board/coral/board.h b/board/coral/board.h
index 9b45db2cf3..cea83ef4a5 100644
--- a/board/coral/board.h
+++ b/board/coral/board.h
@@ -60,7 +60,7 @@
#define CONFIG_CHARGER_BD9995X
#define CONFIG_CHARGER_BD9995X_CHGEN
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MAINTAIN_VBAT
#undef CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON
diff --git a/board/elm/board.h b/board/elm/board.h
index ba542754b5..6e4e705604 100644
--- a/board/elm/board.h
+++ b/board/elm/board.h
@@ -37,7 +37,7 @@
#define CONFIG_BATTERY_SMART
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGE_RAMP_HW
#define CONFIG_CHARGER_ISL9237
diff --git a/board/eve/board.h b/board/eve/board.h
index b9de20896d..e3623979c3 100644
--- a/board/eve/board.h
+++ b/board/eve/board.h
@@ -100,7 +100,7 @@
#define CONFIG_CHARGER_BD9995X
#define CONFIG_CHARGER_BD9995X_CHGEN
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT 5
#define CONFIG_CHARGER_MAINTAIN_VBAT
diff --git a/board/hammer/board.h b/board/hammer/board.h
index ac6131798b..dd4b337c66 100644
--- a/board/hammer/board.h
+++ b/board/hammer/board.h
@@ -269,7 +269,7 @@
#ifdef BOARD_WAND
/* Battery and charger options. */
#define CONFIG_CHARGER
-#define CONFIG_CHARGER_INPUT_CURRENT 128
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 128
#define CONFIG_CHARGER_ISL9238
#define CONFIG_CHARGER_SENSE_RESISTOR 10
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 20
diff --git a/board/host/charger.c b/board/host/charger.c
index fddadf245d..0580ddcb41 100644
--- a/board/host/charger.c
+++ b/board/host/charger.c
@@ -136,7 +136,8 @@ static enum ec_error_list mock_set_input_current_limit(int chgnum, int current)
static enum ec_error_list mock_post_init(int chgnum)
{
- mock_current = mock_input_current = CONFIG_CHARGER_INPUT_CURRENT;
+ mock_current = mock_input_current =
+ CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT;
return EC_SUCCESS;
}
diff --git a/board/mchpevb1/board.h b/board/mchpevb1/board.h
index ae8982f939..dd7c87fd6f 100644
--- a/board/mchpevb1/board.h
+++ b/board/mchpevb1/board.h
@@ -150,7 +150,7 @@
/* #define CONFIG_CHARGER_DISCHARGE_ON_AC */
/* #define CONFIG_CHARGER_ISL9237 */
/* #define CONFIG_CHARGER_ILIM_PIN_DISABLED */
-/* #define CONFIG_CHARGER_INPUT_CURRENT 512 */
+/* #define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512 */
/* #define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512 */
/* #define CONFIG_CHARGER_NARROW_VDC */
diff --git a/board/nami/board.h b/board/nami/board.h
index 1a71e83c4f..652db4826d 100644
--- a/board/nami/board.h
+++ b/board/nami/board.h
@@ -96,7 +96,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_ISL9238
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 27000
#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT 15000
diff --git a/board/nautilus/board.h b/board/nautilus/board.h
index 882b5d74f4..2b4f25538d 100644
--- a/board/nautilus/board.h
+++ b/board/nautilus/board.h
@@ -79,7 +79,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_ISL9238
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_PROFILE_OVERRIDE
#define CONFIG_CHARGER_PSYS
diff --git a/board/nocturne/board.h b/board/nocturne/board.h
index 828c9a2087..73700b8480 100644
--- a/board/nocturne/board.h
+++ b/board/nocturne/board.h
@@ -70,7 +70,7 @@
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 128
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 128
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 128
#define CONFIG_CHARGER_ISL9238
/*
diff --git a/board/oak/board.h b/board/oak/board.h
index ca9e16cf23..c429a655c5 100644
--- a/board/oak/board.h
+++ b/board/oak/board.h
@@ -40,7 +40,7 @@
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#if BOARD_REV == OAK_REV1
diff --git a/board/poppy/board.h b/board/poppy/board.h
index c06f96c438..5242c1d3a8 100644
--- a/board/poppy/board.h
+++ b/board/poppy/board.h
@@ -89,7 +89,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_ISL9238
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 472
#define CONFIG_CHARGER_PSYS
#define CONFIG_CHARGER_SENSE_RESISTOR 10
diff --git a/board/rammus/board.h b/board/rammus/board.h
index 2de783e247..975417df9a 100644
--- a/board/rammus/board.h
+++ b/board/rammus/board.h
@@ -84,7 +84,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_ISL9238
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_PSYS
#define CONFIG_CHARGER_SENSE_RESISTOR 10
diff --git a/board/reef/board.h b/board/reef/board.h
index 16f40c2f4a..cc1783e43a 100644
--- a/board/reef/board.h
+++ b/board/reef/board.h
@@ -50,7 +50,7 @@
#define CONFIG_CHARGER_BD9995X
#define CONFIG_CHARGER_BD9995X_CHGEN
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT 5
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 1
diff --git a/board/reef_it8320/board.h b/board/reef_it8320/board.h
index 558b10152a..dbccc6eeee 100644
--- a/board/reef_it8320/board.h
+++ b/board/reef_it8320/board.h
@@ -48,7 +48,7 @@
#define CONFIG_CHARGER_BD9995X
#define CONFIG_CHARGER_BD9995X_CHGEN
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT 5
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 1
diff --git a/board/reef_mchp/board.h b/board/reef_mchp/board.h
index d570f50142..925f271ffd 100644
--- a/board/reef_mchp/board.h
+++ b/board/reef_mchp/board.h
@@ -53,7 +53,7 @@
#define CONFIG_CHARGER_BD9995X
#define CONFIG_CHARGER_BD9995X_CHGEN
#define CONFIG_CHARGER_DISCHARGE_ON_AC
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT 5
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 1
diff --git a/board/scarlet/board.h b/board/scarlet/board.h
index aba5819516..cdc09f9114 100644
--- a/board/scarlet/board.h
+++ b/board/scarlet/board.h
@@ -69,7 +69,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_RT9467
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 2
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 15000
diff --git a/common/charge_manager.c b/common/charge_manager.c
index 683daaccf6..703b8933db 100644
--- a/common/charge_manager.c
+++ b/common/charge_manager.c
@@ -835,8 +835,8 @@ static void charge_manager_refresh(void)
override_port = OVERRIDE_OFF;
if (new_supplier == CHARGE_SUPPLIER_NONE) {
-#ifdef CONFIG_CHARGER_INPUT_CURRENT
- new_charge_current = CONFIG_CHARGER_INPUT_CURRENT;
+#ifdef CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT
+ new_charge_current = CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT;
#else
new_charge_current = 0;
#endif
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c
index 1e1353a639..05c06cd77e 100644
--- a/common/charge_state_v2.c
+++ b/common/charge_state_v2.c
@@ -1507,9 +1507,9 @@ static int get_desired_input_current(enum battery_present batt_present,
int ilim = charge_manager_get_charger_current();
return ilim == CHARGE_CURRENT_UNINITIALIZED ?
CHARGE_CURRENT_UNINITIALIZED :
- MAX(CONFIG_CHARGER_INPUT_CURRENT, ilim);
+ MAX(CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT, ilim);
#else
- return CONFIG_CHARGER_INPUT_CURRENT;
+ return CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT;
#endif
} else {
#ifdef CONFIG_USB_POWER_DELIVERY
diff --git a/common/ec_ec_comm_server.c b/common/ec_ec_comm_server.c
index 6f37004513..976c3d6996 100644
--- a/common/ec_ec_comm_server.c
+++ b/common/ec_ec_comm_server.c
@@ -169,8 +169,9 @@ handle_cmd_charger_control(const struct ec_params_charger_control *params,
goto out;
}
- /* Reset input current to minimum. */
- charge_set_input_current_limit(CONFIG_CHARGER_INPUT_CURRENT, 0);
+ /* Reset input current to default. */
+ charge_set_input_current_limit(
+ CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT, 0);
/* Setup and enable "OTG". */
charge_set_output_current_limit(CHARGER_SOLO,
-params->max_current,
diff --git a/docs/low_battery_startup.md b/docs/low_battery_startup.md
index 83aae054b5..1f94d4956e 100644
--- a/docs/low_battery_startup.md
+++ b/docs/low_battery_startup.md
@@ -168,7 +168,7 @@ is robust enough to support the device during brief intervals of PD negotiation
without browning out.
```
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 1
```
@@ -205,7 +205,7 @@ the kernel and get to the login screen.
```
/* Limit battery impact during PD voltage changes. */
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
/* Distrust the battery SOC measurement a bit. */
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 3
@@ -256,7 +256,7 @@ less. Very briefly drawing current out of the battery does not cause a brownout.
Example configuration:
```
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 3
#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 15000
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 27000
@@ -300,7 +300,7 @@ performing a no-battery boot. Nami is an exemplar.
Example configuration:
```
-#define CONFIG_CHARGER_INPUT_CURRENT 512
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC 1
#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT 15000
@@ -336,7 +336,7 @@ Example configuration:
## Configuration Option Details
-### `CONFIG_CHARGER_INPUT_CURRENT`
+### `CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT`
Required.
@@ -350,13 +350,13 @@ in order to improve compatibility with marginal BC1.2 chargers.
Optional.
If set, charger input current limits will never be set lower than this value.
-Historically most boards used the same value as `CONFIG_CHARGER_INPUT_CURRENT`,
-but doing so violates USB-PD standby power requirements when voltages greater
-than 5V are used with the default 512 mA value. Configuring this option to a
-nonzero value may be useful if a board needs extra headroom (possibly at the
-cost of drawing excess standby power), but boards should prefer to
-override `board_set_charge_limit()` instead to limit situations with excess
-power draw to only occur when that extra power is needed.
+Historically most boards used the same value
+as `CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT`, but doing so violates USB-PD standby
+power requirements when voltages greater than 5V are used with the default 512
+mA value. Configuring this option to a nonzero value may be useful if a board
+needs extra headroom (possibly at the cost of drawing excess standby power), but
+boards should prefer to override `board_set_charge_limit()` instead to limit
+situations with excess power draw to only occur when that extra power is needed.
### `CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON`
diff --git a/driver/charger/bd9995x.c b/driver/charger/bd9995x.c
index aa37bf4e8a..f7e4ffacaa 100644
--- a/driver/charger/bd9995x.c
+++ b/driver/charger/bd9995x.c
@@ -904,7 +904,8 @@ static void bd9995x_battery_charging_profile_settings(int chgnum)
const struct battery_info *bi = battery_get_info();
/* Input Current Limit Setting */
- bd9995x_set_input_current_limit(chgnum, CONFIG_CHARGER_INPUT_CURRENT);
+ bd9995x_set_input_current_limit(chgnum,
+ CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT);
/* Charge Termination Current Setting */
ch_raw_write16(chgnum, BD9995X_CMD_ITERM_SET, 0,
@@ -1004,10 +1005,10 @@ static void bd9995x_init(void)
* Disable the input current limit when VBAT is < VSYSREG_SET. This
* needs to be done before calling
* bd9995x_battery_charging_profile_settings() as in that function the
- * input current limit is set to CONFIG_CHARGER_INPUT_CURRENT which is
- * 512 mA. In deeply discharged battery cases, setting the input current
- * limit this low can cause VSYS to collapse, which in turn can cause
- * the EC's brownout detector to reset the EC.
+ * input current limit is set to CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT
+ * which is 512 mA. In deeply discharged battery cases, setting the
+ * input current limit this low can cause VSYS to collapse, which in
+ * turn can cause the EC's brownout detector to reset the EC.
*/
if (ch_raw_read16(CHARGER_SOLO, BD9995X_CMD_VIN_CTRL_SET, &reg,
BD9995X_EXTENDED_COMMAND))
diff --git a/driver/charger/bq24715.c b/driver/charger/bq24715.c
index 8e8e0efd50..0847618f3c 100644
--- a/driver/charger/bq24715.c
+++ b/driver/charger/bq24715.c
@@ -207,8 +207,8 @@ static enum ec_error_list bq24715_post_init(int chgnum)
if (rv)
return rv;
- rv = bq24715_set_input_current_limit(chgnum,
- CONFIG_CHARGER_INPUT_CURRENT);
+ rv = bq24715_set_input_current_limit(
+ chgnum, CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT);
return rv;
}
diff --git a/driver/charger/isl923x.c b/driver/charger/isl923x.c
index 04db73353a..17798b113d 100644
--- a/driver/charger/isl923x.c
+++ b/driver/charger/isl923x.c
@@ -772,7 +772,7 @@ static void isl923x_init(int chgnum)
* Initialize the input current limit to the board's default.
*/
if (isl923x_set_input_current_limit(
- chgnum, CONFIG_CHARGER_INPUT_CURRENT))
+ chgnum, CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT))
goto init_fail;
}
diff --git a/driver/charger/isl9241.c b/driver/charger/isl9241.c
index 9ca2e9f3e0..6ff0db26e9 100644
--- a/driver/charger/isl9241.c
+++ b/driver/charger/isl9241.c
@@ -893,8 +893,8 @@ static void isl9241_init(int chgnum)
return;
/* Initialize the input current limit to the board's default. */
- if (isl9241_set_input_current_limit(chgnum,
- CONFIG_CHARGER_INPUT_CURRENT))
+ if (isl9241_set_input_current_limit(
+ chgnum, CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT))
goto init_fail;
return;
diff --git a/driver/charger/sm5803.c b/driver/charger/sm5803.c
index f6d4e60eec..a64e541f6b 100644
--- a/driver/charger/sm5803.c
+++ b/driver/charger/sm5803.c
@@ -712,7 +712,7 @@ static void sm5803_init(int chgnum)
rv |= chg_write8(chgnum, SM5803_REG_DPM_VL_SET_LSB, (reg & 0x7));
/* Set default input current */
- reg = SM5803_CURRENT_TO_REG(CONFIG_CHARGER_INPUT_CURRENT) &
+ reg = SM5803_CURRENT_TO_REG(CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT) &
SM5803_CHG_ILIM_RAW;
rv |= chg_write8(chgnum, SM5803_REG_CHG_ILIM, reg);
diff --git a/include/config.h b/include/config.h
index a9a346c464..8d78921cde 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1033,14 +1033,15 @@
#undef CONFIG_CHARGER_ILIM_PIN_DISABLED
/*
- * Default input current for the board, in mA.
+ * Default input current for the board, in mA. Many boards also use this as the
+ * least maximum input current during transients.
*
* This value should depend on external power adapter, designed charging
* voltage, and the maximum power of the running system. For type-C chargers,
* this should be set to 512 mA in order to not brown-out low-current USB
* charge ports in accordance with USB-PD r3.0 Sec. 7.3
*/
-#undef CONFIG_CHARGER_INPUT_CURRENT
+#undef CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT
/*
* Minimum current limit that will ever be set for chargers, even if a lower
@@ -1053,8 +1054,8 @@
* conditions at the cost of violating standby power limits.
*
* Many boards set this to large values, since historically this number was
- * usually equal to CONFIG_CHARGER_INPUT_CURRENT. New boards should avoid doing
- * so if possible.
+ * usually equal to CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT. New boards should
+ * avoid doing so if possible.
*/
#undef CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT
diff --git a/test/test_config.h b/test/test_config.h
index a25d8c0845..704c3b42c1 100644
--- a/test/test_config.h
+++ b/test/test_config.h
@@ -305,7 +305,7 @@ enum sensor_id {
#define CONFIG_BATTERY_SMART
#define CONFIG_CHARGER
#define CONFIG_CHARGER_PROFILE_OVERRIDE
-#define CONFIG_CHARGER_INPUT_CURRENT 4032
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 4032
#define CONFIG_CHARGER_DISCHARGE_ON_AC
#define CONFIG_CHARGER_DISCHARGE_ON_AC_CUSTOM
#define CONFIG_I2C
@@ -346,7 +346,7 @@ int ncp15wb_calculate_temp(uint16_t adc);
#ifdef TEST_BATTERY_GET_PARAMS_SMART
#define CONFIG_BATTERY_MOCK
#define CONFIG_BATTERY_SMART
-#define CONFIG_CHARGER_INPUT_CURRENT 4032
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 4032
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
#define I2C_PORT_MASTER 0
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index 7f65419a4b..082f96ca7f 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -31,18 +31,18 @@ rsource "Kconfig.usb_charger"
if PLATFORM_EC_USBC
-config PLATFORM_EC_CHARGER_INPUT_CURRENT
+config PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT
int "Charger input current in mA"
depends on PLATFORM_EC_CHARGE_MANAGER
default 512
help
- This is the default input current for the board in mA. Many boards
- also use this as the least maximum input current during transients.
+ Default input current limit for the board in mA.
This value should depend on external power adapter, designed charging
voltage, and the maximum power of the running system. For type-C
- chargers, this should be set to 512 mA in order to not brown-out
- low-current USB charge ports in accordance with USB-PD r3.0 Sec. 7.3
+ chargers, this should be set to no more than 512 mA in order to not
+ brown-out low-current USB charge ports in accordance with USB-PD r3.0
+ Sec. 7.3.
config PLATFORM_EC_CHARGER_MIN_INPUT_CURRENT_LIMIT
int "Minimum charger input current limit in mA"
diff --git a/zephyr/program/rex/prj.conf b/zephyr/program/rex/prj.conf
index 8b783e30f7..221f1e712b 100644
--- a/zephyr/program/rex/prj.conf
+++ b/zephyr/program/rex/prj.conf
@@ -71,7 +71,7 @@ CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT=y
# Charger
CONFIG_PLATFORM_EC_CHARGER_DISCHARGE_ON_AC=y
-CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT=512
+CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT=512
CONFIG_PLATFORM_EC_CHARGER_ISL9241=y
CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR=5
CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR_AC=10
diff --git a/zephyr/program/skyrim/prj.conf b/zephyr/program/skyrim/prj.conf
index 0c90952ceb..e879e1153b 100644
--- a/zephyr/program/skyrim/prj.conf
+++ b/zephyr/program/skyrim/prj.conf
@@ -69,7 +69,7 @@ CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT=y
# Charger
CONFIG_PLATFORM_EC_CHARGER_DISCHARGE_ON_AC=y
-CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT=512
+CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT=512
CONFIG_PLATFORM_EC_CHARGER_MIN_INPUT_CURRENT_LIMIT=512
CONFIG_PLATFORM_EC_CHARGER_ISL9241=y
CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR=10
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index c0d388b60b..28a93739c5 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1078,9 +1078,10 @@ extern char mock_jump_data[CONFIG_PLATFORM_EC_PRESERVED_END_OF_RAM_SIZE];
CONFIG_PLATFORM_EC_CHARGESPLASH_MAX_REQUESTS_PER_PERIOD
#endif
-#undef CONFIG_CHARGER_INPUT_CURRENT
-#ifdef CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT
-#define CONFIG_CHARGER_INPUT_CURRENT CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT
+#undef CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT
+#ifdef CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT
+#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT \
+ CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT
#endif
#undef CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT
diff --git a/zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201.c b/zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201.c
index a384fb1e0a..0f9e7cbbeb 100644
--- a/zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201.c
+++ b/zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201.c
@@ -75,7 +75,7 @@ static const struct bc12_status bc12_chg_limits[] = {
[CHG_RESERVED] = { .supplier = CHARGE_SUPPLIER_NONE,
/* Not charging, limit is set to default */
.current_limit =
- CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT },
+ CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT },
[CHG_CDP] = { .supplier = CHARGE_SUPPLIER_BC12_CDP,
.current_limit = USB_CHARGER_MAX_CURR_MA },
[CHG_SDP] = { .supplier = CHARGE_SUPPLIER_BC12_SDP,
@@ -212,7 +212,7 @@ test_bc12_pi3usb9201_client_mode(enum pi3usb9201_client_sts detect_result,
zassert_equal(charge_manager_get_supplier(), CHARGE_SUPPLIER_NONE,
NULL);
zassert_equal(charge_manager_get_charger_current(),
- CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT);
+ CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT);
zassert_equal(charge_manager_get_charger_voltage(), 0);
}
diff --git a/zephyr/test/drivers/common_charger/src/test_common_charger.c b/zephyr/test/drivers/common_charger/src/test_common_charger.c
index eb7d6f1f08..46403636d6 100644
--- a/zephyr/test/drivers/common_charger/src/test_common_charger.c
+++ b/zephyr/test/drivers/common_charger/src/test_common_charger.c
@@ -50,7 +50,7 @@ ZTEST(common_charger, test_chg_ramp_is_detected)
ZTEST(common_charger, test_chg_ramp_get_current_limit)
{
zassert_equal(chg_ramp_get_current_limit(),
- CONFIG_CHARGER_INPUT_CURRENT);
+ CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT);
}
ZTEST(common_charger, test_charger_get_min_bat_pct_for_power_on)
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c b/zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c
index 10ade25222..f2afa5be9a 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_20v_3a_pd_charger.c
@@ -176,9 +176,9 @@ ZTEST_F(usb_attach_20v_3a_pd_charger, test_disconnect_charge_state)
"Max charge current expected 0mA, but was %dmA",
charge_state.get_state.chg_current);
zassert_equal(charge_state.get_state.chg_input_current,
- CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT,
+ CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT,
"Charge input current limit expected %dmA, but was %dmA",
- CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT,
+ CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT,
charge_state.get_state.chg_input_current);
}
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c b/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c
index 218ef9550e..6795e72c11 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_sink.c
@@ -159,9 +159,9 @@ ZTEST_F(usb_attach_5v_3a_pd_sink, test_disconnect_charge_state)
"Max charge current expected 0mA, but was %dmA",
charge_state.get_state.chg_current);
zassert_equal(charge_state.get_state.chg_input_current,
- CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT,
+ CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT,
"Charge input current limit expected %dmA, but was %dmA",
- CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT,
+ CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT,
charge_state.get_state.chg_input_current);
}
diff --git a/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c b/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c
index 325b8aee8c..c57054881d 100644
--- a/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c
+++ b/zephyr/test/drivers/default/src/integration/usbc/usb_5v_3a_pd_source.c
@@ -172,9 +172,9 @@ ZTEST_F(usb_attach_5v_3a_pd_source, test_disconnect_charge_state)
"Max charge current expected 0mA, but was %dmA",
charge_state.get_state.chg_current);
zassert_equal(charge_state.get_state.chg_input_current,
- CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT,
+ CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT,
"Charge input current limit expected %dmA, but was %dmA",
- CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT,
+ CONFIG_PLATFORM_EC_CHARGER_DEFAULT_CURRENT_LIMIT,
charge_state.get_state.chg_input_current);
}
diff --git a/zephyr/test/drivers/default/src/isl923x.c b/zephyr/test/drivers/default/src/isl923x.c
index 72aad72cd9..1393466c76 100644
--- a/zephyr/test/drivers/default/src/isl923x.c
+++ b/zephyr/test/drivers/default/src/isl923x.c
@@ -681,9 +681,9 @@ ZTEST(isl923x, test_init_late_jump)
isl923x_drv.get_input_current_limit(CHARGER_NUM,
&input_current),
"Could not read input current limit.");
- zassert_equal(CONFIG_CHARGER_INPUT_CURRENT, input_current,
+ zassert_equal(CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT, input_current,
"Input current (%d) not at (%d)", input_current,
- CONFIG_CHARGER_INPUT_CURRENT);
+ CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT);
}
ZTEST(isl923x, test_isl923x_is_acok)