power: Make pm_system_suspend private
pm_system_suspend is called only from the idle thread and should not be exported as a public API. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
0d9da124cd
commit
10f29359d7
2 changed files with 21 additions and 25 deletions
|
@ -247,31 +247,6 @@ void pm_system_resume_from_deep_sleep(void);
|
|||
*/
|
||||
void pm_system_resume(void);
|
||||
|
||||
/**
|
||||
* @brief Allow entry to power state
|
||||
*
|
||||
* When the kernel is about to go idle, it calls this function to notify the
|
||||
* power management subsystem, that the kernel is ready to enter the idle state.
|
||||
*
|
||||
* At this point, the kernel has disabled interrupts and computed the maximum
|
||||
* time the system can remain idle. The function passes the time that the system
|
||||
* can remain idle. The SOC interface performs power operations that can be done
|
||||
* in the available time. The power management operations must halt execution of
|
||||
* the CPU.
|
||||
*
|
||||
* This function assumes that a wake up event has already been set up by the
|
||||
* application.
|
||||
*
|
||||
* This function is entered with interrupts disabled. It should re-enable
|
||||
* interrupts if it had entered a power state.
|
||||
*
|
||||
* @param ticks The upcoming kernel idle time.
|
||||
*
|
||||
* @return Power state which was entered or POWER_STATE_ACTIVE if SoC was
|
||||
* kept in the active state.
|
||||
*/
|
||||
enum pm_state pm_system_suspend(int32_t ticks);
|
||||
|
||||
/**
|
||||
* @brief Do any SoC or architecture specific post ops after sleep state exits.
|
||||
*
|
||||
|
|
|
@ -207,6 +207,27 @@ void z_kernel_map_fixup(void);
|
|||
!__i.key; \
|
||||
k_spin_unlock(lck, __key), __i.key = 1)
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
/* When the kernel is about to go idle, it calls this function to notify the
|
||||
* power management subsystem, that the kernel is ready to enter the idle state.
|
||||
*
|
||||
* At this point, the kernel has disabled interrupts and computed the maximum
|
||||
* time the system can remain idle. The function passes the time that the system
|
||||
* can remain idle. The SOC interface performs power operations that can be done
|
||||
* in the available time. The power management operations must halt execution of
|
||||
* the CPU.
|
||||
*
|
||||
* This function assumes that a wake up event has already been set up by the
|
||||
* application.
|
||||
*
|
||||
* This function is entered with interrupts disabled. It should re-enable
|
||||
* interrupts if it had entered a power state.
|
||||
*/
|
||||
enum pm_state pm_system_suspend(int32_t ticks);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue