summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2022-03-16 11:26:37 +0800
committerCommit Bot <commit-bot@chromium.org>2022-03-16 07:41:50 +0000
commite0629f0333e20c49ad0e889dcc983a77719ab909 (patch)
tree8105e4fe2bf6be57b04c5c562161be3f95c40e38
parent6ef756e3ddc8a07ab61e551119d406172c36ae2c (diff)
downloadchrome-ec-e0629f0333e20c49ad0e889dcc983a77719ab909.tar.gz
dps: ensure DPS task waited for enough time
DPS task will be waken up if new srccaps received, but the DPS should wait enough time and then start the next evaluation, or we might measure the starting up current and power and the value will be underestimated. BUG=b:169532537 TEST=enable DPS, and it won't sample starting up current and power BRANCH=cherry Change-Id: I995639b4d9f88ef4eaae02ad07b49fb9b6ffee0a Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3527895 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
-rw-r--r--common/dps.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/dps.c b/common/dps.c
index 5becce7dc7..3af25e6280 100644
--- a/common/dps.c
+++ b/common/dps.c
@@ -476,6 +476,7 @@ void dps_task(void *u)
flag |= DPS_FLAG_WAITING;
task_wait_event(timeout.val - now.val);
flag &= ~DPS_FLAG_WAITING;
+ continue;
}
if (!is_enabled) {