Skip to content

Commit 3a58885

Browse files
kwd-doodlingChromeos LUCI
authored andcommitted
pm: re-program timer HW only when the exit latency is not zero
Avoid re-programming timer unnecessarily. (cherry picked from commit 6a962fb) Original-Signed-off-by: Dong Wang <[email protected]> Original-Signed-off-by: Flavio Ceolin <[email protected]> GitOrigin-RevId: 6a962fb Change-Id: I1c2efbc0109b94015e63531ccaf2b3967c7c2d38 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5520822 Reviewed-by: Ting Shen <[email protected]> Tested-by: ChromeOS Prod (Robot) <[email protected]> Commit-Queue: Ting Shen <[email protected]> Tested-by: Ting Shen <[email protected]>
1 parent 70916e7 commit 3a58885

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/pm/pm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ bool pm_system_suspend(int32_t ticks)
210210
}
211211
#endif
212212

213-
if (ticks != K_TICKS_FOREVER) {
213+
if ((z_cpus_pm_state[id].exit_latency_us != 0) &&
214+
(ticks != K_TICKS_FOREVER)) {
214215
/*
215216
* We need to set the timer to interrupt a little bit early to
216217
* accommodate the time required by the CPU to fully wake up.

0 commit comments

Comments
 (0)