pm: system: Restore clock after sleep

sys_clock_idle_exits was being called *only* when the system
was resumed from interruption.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2024-04-29 14:57:55 -07:00 committed by Carles Cufí
commit 4c5ee9b2db

View file

@ -151,6 +151,9 @@ void pm_system_resume(void)
#endif #endif
pm_state_exit_post_ops(z_cpus_pm_state[id].state, z_cpus_pm_state[id].substate_id); pm_state_exit_post_ops(z_cpus_pm_state[id].state, z_cpus_pm_state[id].substate_id);
pm_state_notify(false); pm_state_notify(false);
#ifdef CONFIG_SYS_CLOCK_EXISTS
sys_clock_idle_exit();
#endif /* CONFIG_SYS_CLOCK_EXISTS */
z_cpus_pm_state[id] = (struct pm_state_info){PM_STATE_ACTIVE, z_cpus_pm_state[id] = (struct pm_state_info){PM_STATE_ACTIVE,
0, 0}; 0, 0};
} }
@ -289,7 +292,4 @@ void z_pm_save_idle_exit(void)
* This can be simply ignored if not required. * This can be simply ignored if not required.
*/ */
pm_system_resume(); pm_system_resume();
#ifdef CONFIG_SYS_CLOCK_EXISTS
sys_clock_idle_exit();
#endif /* CONFIG_SYS_CLOCK_EXISTS */
} }