summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-05-05 12:01:42 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-09 22:29:36 +0000
commit5e2d3b14dc9359d052a18f844fe906b8fffee110 (patch)
tree2552df269ca63d99d8a18802521253cb3793cf39
parentf3d5f4915582a0e59b69f44d209bfa9fff8c1ad8 (diff)
downloadchrome-ec-5e2d3b14dc9359d052a18f844fe906b8fffee110.tar.gz
charger: Pass debugging variable to base function
Pass this variable in as an argument, so we can eventually move the base code out into its own file. BUG=b:218332694 TEST=zmake build dev-posix Check size on lux: *** 69552 bytes in flash and 1152 bytes in RAM lux RO **** *** 69452 bytes in flash and 1120 bytes in RAM lux RW **** Change-Id: I14fb41b07a1baa8bc38efe493de9c4242dda3456 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4510242 Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
-rw-r--r--common/charge_state_v2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c
index ae5833637d..880756e384 100644
--- a/common/charge_state_v2.c
+++ b/common/charge_state_v2.c
@@ -475,7 +475,7 @@ static int add_margin(int value, int m)
/* allocate power between the base and the lid */
static void
base_charge_allocate_input_current_limit(const struct charge_state_data *curr,
- bool is_full)
+ bool is_full, bool debugging)
{
#ifdef CONFIG_EC_EC_COMM_BATTERY_CLIENT
/*
@@ -1981,10 +1981,12 @@ static void adjust_requested_vi(const struct charger_info *const info,
curr.requested_current = 0;
}
- if (IS_ENABLED(CONFIG_EC_EC_COMM_BATTERY_CLIENT))
- base_charge_allocate_input_current_limit(&curr, is_full);
- else
+ if (IS_ENABLED(CONFIG_EC_EC_COMM_BATTERY_CLIENT)) {
+ base_charge_allocate_input_current_limit(&curr, is_full,
+ debugging);
+ } else {
charge_request(true, is_full);
+ }
}
/* Handle selection of the preferred voltage */