summaryrefslogtreecommitdiff
path: root/common/charger_base.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-05-05 12:42:07 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-09 22:29:40 +0000
commit5be73aa62a6ce6ccb72624c128c3dd76b5ac828b (patch)
tree45565c6d46303e0ebe3f0615bdf568f2808f4e92 /common/charger_base.c
parentf53ec2533fc46bb6ceb955715b4be8d1be4cbe37 (diff)
downloadchrome-ec-5be73aa62a6ce6ccb72624c128c3dd76b5ac828b.tar.gz
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 <asemjonovs@google.com> Tested-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/charger_base.c')
-rw-r--r--common/charger_base.c7
1 files changed, 6 insertions, 1 deletions
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|<current>)|discharge (auto|<current>)]",
"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);