This commit simplifies OS <-> Application interface controlling power management. In the previous approach application-based PM required overriding sys_suspend() and sys_resume() functions. As these functions actually implemented power state change, in such case application basically had to provide own implementation of all PM-related stuff, which was not portable and hard to maintain. This commit changes this scheme: The sys_suspend() and sys_resume() are now system functions while the application could either use built-in power management policies or provide its own. All details of power mode switching are now handled by the OS. Also, this commit cleans up the Kconfig options related to system-level power management grouping them under common CONFIG_SYS_PM_ prefix. Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
13 lines
382 B
Plaintext
13 lines
382 B
Plaintext
config KERNEL_PROFILING_API_TEST
|
|
bool
|
|
default y
|
|
select SYS_POWER_LOW_POWER_STATES_SUPPORTED
|
|
select SYS_POWER_STATE_CPU_LPS_SUPPORTED
|
|
help
|
|
Hidden option enabling LPS power state regardless of hardware
|
|
support. This ensures that power management hooks used in this
|
|
test to profile idle thread will be executed.
|
|
|
|
# Include Zephyr's Kconfig.
|
|
source "$ZEPHYR_BASE/Kconfig"
|