power: add system power management direct force mode.

Add system power management direct force trigger mode. In this
mode application thread can directly put system in sleep or deep
sleep mode instead of waiting for idle thread to do it, so that
it can reduce latency to enter low power mode.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This commit is contained in:
Wentong Wu 2020-01-22 03:36:21 -05:00 committed by Anas Nashif
commit 7cb74655da
3 changed files with 17 additions and 0 deletions

View file

@ -151,6 +151,9 @@ static inline void _sys_pm_idle_exit_notification_disable(void)
* And before the end of suspend, the state of forced_pm_state
* is cleared with interrupt disabled.
*
* If enabled SYS_PM_DIRECT_FORCE_MODE, this function can only
* run in thread context.
*
* @param state Power state which should be used in the ongoing
* suspend operation or SYS_POWER_STATE_AUTO.
*/