From e0629f0333e20c49ad0e889dcc983a77719ab909 Mon Sep 17 00:00:00 2001 From: Eric Yilun Lin Date: Wed, 16 Mar 2022 11:26:37 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3527895 Reviewed-by: Ting Shen Commit-Queue: Eric Yilun Lin Tested-by: Eric Yilun Lin --- common/dps.c | 1 + 1 file changed, 1 insertion(+) 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) { -- cgit v1.2.1