From 5be73aa62a6ce6ccb72624c128c3dd76b5ac828b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 5 May 2023 12:42:07 -0600 Subject: charger: Move base_responsive to charger_base.c This variable is not used in the main charger file. Move it over to the base file by creating a setup function for the base, calling it from the charger_setup() function. This makes no functional change. BUG=b:218332694 TEST=zmake build dev-posix Check size on lux: *** 69552 bytes in flash and 1152 bytes in RAM lux RO **** *** 69448 bytes in flash and 1120 bytes in RAM lux RW **** Change-Id: Idbdb7639cb51e65de2c77303545221cca25c8865 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4510245 Reviewed-by: Al Semjonovs Tested-by: Simon Glass Commit-Queue: Simon Glass --- common/charger_base.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'common/charger_base.c') diff --git a/common/charger_base.c b/common/charger_base.c index af76b1f51c..127229068c 100644 --- a/common/charger_base.c +++ b/common/charger_base.c @@ -21,7 +21,7 @@ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ##args) /* Base has responded to one of our commands already. */ -int base_responsive; +static int base_responsive; int charge_base; int prev_charge_base; static int prev_current_base; @@ -642,5 +642,10 @@ DECLARE_CONSOLE_COMMAND(chgdualdebug, command_chgdualdebug, "[charge (auto|)|discharge (auto|)]", "Manually control dual-battery charging algorithm."); +void charger_base_setup(void) +{ + base_responsive = 0; +} + /* Reset the base on S5->S0 transition. */ DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_base_reset, HOOK_PRIO_DEFAULT); -- cgit v1.2.1