Skip to content

Commit 216476c

Browse files
nordic-krchkartben
authored andcommitted
pm: Fix case when forced state is not set
pm_suspend is returning early if there are no states available (due to locking or latency policy). However, if state is forced it should not return but rather enter forced power state. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 6a672bc commit 216476c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/pm/pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ bool pm_system_suspend(int32_t kernel_ticks)
147147

148148
SYS_PORT_TRACING_FUNC_ENTER(pm, system_suspend, kernel_ticks);
149149

150-
if (!pm_policy_state_any_active()) {
150+
if (!pm_policy_state_any_active() && (z_cpus_pm_forced_state[id] == NULL)) {
151151
/* Return early if all states are unavailable. */
152152
return false;
153153
}

0 commit comments

Comments
 (0)