diff options
author | Fabio Baltieri <fabiobaltieri@google.com> | 2022-04-28 18:23:52 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-29 10:19:59 +0000 |
commit | de78b8b89ff0df7b74fd55a4d01716f7c0af39c6 (patch) | |
tree | 9b5f49cd250f7cf00cedbcadfc428eb88ed8f8a6 /zephyr/shim | |
parent | 4654b2ccd31a19dbc06b878739e29019177f61a9 (diff) | |
download | chrome-ec-de78b8b89ff0df7b74fd55a4d01716f7c0af39c6.tar.gz |
zephyr: shim: update the pm_policy_state_lock_is_active API
Update the pm_policy_state_lock_is_active() calls to add the new
argument introduced in:
69b28bfd07 pm: policy: Consider substates for state lock functions
Setting the second argument to PM_ALL_SUBSTATES should maintain the
current behavior.
BRANCH=none
BUG=none
TEST=zmake testall
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Cq-Depend: chromium:3614848
Change-Id: Ia39d346367f2baf165b609776b3571415b241417
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3613914
Reviewed-by: Yuval Peress <peress@google.com>
Diffstat (limited to 'zephyr/shim')
-rw-r--r-- | zephyr/shim/chip/it8xxx2/power_policy.c | 2 | ||||
-rw-r--r-- | zephyr/shim/chip/npcx/power_policy.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/zephyr/shim/chip/it8xxx2/power_policy.c b/zephyr/shim/chip/it8xxx2/power_policy.c index 7ef0259ae2..e1d9ea7bb2 100644 --- a/zephyr/shim/chip/it8xxx2/power_policy.c +++ b/zephyr/shim/chip/it8xxx2/power_policy.c @@ -30,7 +30,7 @@ const struct pm_state_info *pm_policy_next_state(uint8_t cpu, int32_t ticks) * could be used. */ if (pm_policy_state_lock_is_active( - pm_states[i].state)) { + pm_states[i].state, PM_ALL_SUBSTATES)) { continue; } diff --git a/zephyr/shim/chip/npcx/power_policy.c b/zephyr/shim/chip/npcx/power_policy.c index df7d2ff7a2..c95fcc56d8 100644 --- a/zephyr/shim/chip/npcx/power_policy.c +++ b/zephyr/shim/chip/npcx/power_policy.c @@ -23,7 +23,8 @@ const struct pm_state_info *pm_policy_next_state(uint8_t cpu, int32_t ticks) if (DEEP_SLEEP_ALLOWED) { for (int i = ARRAY_SIZE(residency_info) - 1; i >= 0; i--) { if (pm_policy_state_lock_is_active( - residency_info[i].state)) { + residency_info[i].state, + PM_ALL_SUBSTATES)) { continue; } |