diff --git a/samples/subsys/pm/latency/Kconfig b/samples/subsys/pm/latency/Kconfig index 0e08794c13..e3578670dd 100644 --- a/samples/subsys/pm/latency/Kconfig +++ b/samples/subsys/pm/latency/Kconfig @@ -8,3 +8,9 @@ endmenu module = APP module-str = Application source "subsys/logging/Kconfig.template.log_config" + + +config APP_PROVIDE_PM_HOOKS + bool "Application provides PM hooks" + default y + select HAS_PM diff --git a/tests/subsys/pm/device_wakeup_api/Kconfig b/tests/subsys/pm/device_wakeup_api/Kconfig new file mode 100644 index 0000000000..6a021dcd94 --- /dev/null +++ b/tests/subsys/pm/device_wakeup_api/Kconfig @@ -0,0 +1,11 @@ +# Copyright (c) 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +menu "Zephyr" +source "Kconfig.zephyr" +endmenu + +config TEST_PROVIDE_PM_HOOKS + bool "Provide PM hooks for test purposes" + default y + select HAS_PM diff --git a/tests/subsys/pm/policy_api/Kconfig b/tests/subsys/pm/policy_api/Kconfig new file mode 100644 index 0000000000..6a021dcd94 --- /dev/null +++ b/tests/subsys/pm/policy_api/Kconfig @@ -0,0 +1,11 @@ +# Copyright (c) 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +menu "Zephyr" +source "Kconfig.zephyr" +endmenu + +config TEST_PROVIDE_PM_HOOKS + bool "Provide PM hooks for test purposes" + default y + select HAS_PM diff --git a/tests/subsys/pm/policy_api/src/main.c b/tests/subsys/pm/policy_api/src/main.c index c29c7eb86d..8ea72d7e3f 100644 --- a/tests/subsys/pm/policy_api/src/main.c +++ b/tests/subsys/pm/policy_api/src/main.c @@ -9,6 +9,20 @@ #include #include +void pm_state_set(enum pm_state state, uint8_t substate_id) +{ + ARG_UNUSED(substate_id); + ARG_UNUSED(state); +} + +void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) +{ + ARG_UNUSED(state); + ARG_UNUSED(substate_id); + + irq_unlock(0); +} + #ifdef CONFIG_PM_POLICY_DEFAULT /** * @brief Test the behavior of pm_policy_next_state() when diff --git a/tests/subsys/pm/power_mgmt/Kconfig b/tests/subsys/pm/power_mgmt/Kconfig new file mode 100644 index 0000000000..6a021dcd94 --- /dev/null +++ b/tests/subsys/pm/power_mgmt/Kconfig @@ -0,0 +1,11 @@ +# Copyright (c) 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +menu "Zephyr" +source "Kconfig.zephyr" +endmenu + +config TEST_PROVIDE_PM_HOOKS + bool "Provide PM hooks for test purposes" + default y + select HAS_PM diff --git a/tests/subsys/pm/power_mgmt_multicore/Kconfig b/tests/subsys/pm/power_mgmt_multicore/Kconfig new file mode 100644 index 0000000000..6a021dcd94 --- /dev/null +++ b/tests/subsys/pm/power_mgmt_multicore/Kconfig @@ -0,0 +1,11 @@ +# Copyright (c) 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +menu "Zephyr" +source "Kconfig.zephyr" +endmenu + +config TEST_PROVIDE_PM_HOOKS + bool "Provide PM hooks for test purposes" + default y + select HAS_PM