power: Fix naming of Kconfig options controlling deep sleep states
This commit changes the names of SYS_POWER_DEEP_SLEEP* Kconfig
options in order to match SYS_POWER_LOW_POWER_STATE* naming
scheme.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
diff --git a/Kconfig.zephyr b/Kconfig.zephyr
index 287e9a5..585ec15 100644
--- a/Kconfig.zephyr
+++ b/Kconfig.zephyr
@@ -391,7 +391,7 @@
config BOOTLOADER_CONTEXT_RESTORE
bool "Boot loader has context restore support"
default y
- depends on SYS_POWER_DEEP_SLEEP && BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
+ depends on SYS_POWER_DEEP_SLEEP_STATES && BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
help
This option signifies that the target has a bootloader
that restores CPU context upon resuming from deep sleep
diff --git a/arch/Kconfig b/arch/Kconfig
index 96cf0ab..daa88e7 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -378,11 +378,11 @@
This option signifies that the target supports the SYS_POWER_STATE_CPU_LPS_2
configuration option.
-config SYS_POWER_DEEP_SLEEP_SUPPORTED
+config SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED
# Hidden
bool
help
- This option signifies that the target supports the SYS_POWER_DEEP_SLEEP
+ This option signifies that the target supports the SYS_POWER_DEEP_SLEEP_STATES
configuration option.
config SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
diff --git a/arch/arc/core/reset.S b/arch/arc/core/reset.S
index 3707837..917f463 100644
--- a/arch/arc/core/reset.S
+++ b/arch/arc/core/reset.S
@@ -88,7 +88,7 @@
done_cache_invalidate:
-#if defined(CONFIG_SYS_POWER_DEEP_SLEEP) && \
+#if defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES) && \
!defined(CONFIG_BOOTLOADER_CONTEXT_RESTORE)
jl @sys_resume_from_deep_sleep
#endif
diff --git a/arch/x86/core/crt0.S b/arch/x86/core/crt0.S
index 5087395..6c52ad8 100644
--- a/arch/x86/core/crt0.S
+++ b/arch/x86/core/crt0.S
@@ -38,7 +38,7 @@
GDATA(__start_time_stamp)
#endif
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
GTEXT(sys_resume_from_deep_sleep)
#endif
@@ -284,7 +284,7 @@
#else
addl $CONFIG_ISR_STACK_SIZE, %esp
#endif
-#if defined(CONFIG_SYS_POWER_DEEP_SLEEP) && \
+#if defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES) && \
!defined(CONFIG_BOOTLOADER_CONTEXT_RESTORE)
/*
* Invoke sys_resume_from_deep_sleep() hook to handle resume from
diff --git a/doc/reference/power_management/index.rst b/doc/reference/power_management/index.rst
index c995f6e..1bb6050 100644
--- a/doc/reference/power_management/index.rst
+++ b/doc/reference/power_management/index.rst
@@ -441,7 +441,7 @@
This flag enables support for the Low Power states.
-:option:`CONFIG_SYS_POWER_DEEP_SLEEP`
+:option:`CONFIG_SYS_POWER_DEEP_SLEEP_STATES`
This flag enables support for the Deep Sleep states.
diff --git a/ext/hal/qmsi/CMakeLists.txt b/ext/hal/qmsi/CMakeLists.txt
index 405f916..9c7e19b 100644
--- a/ext/hal/qmsi/CMakeLists.txt
+++ b/ext/hal/qmsi/CMakeLists.txt
@@ -1,7 +1,7 @@
zephyr_library()
zephyr_compile_definitions( ENABLE_EXTERNAL_ISR_HANDLING)
-zephyr_compile_definitions_ifdef(CONFIG_SYS_POWER_DEEP_SLEEP ENABLE_RESTORE_CONTEXT)
+zephyr_compile_definitions_ifdef(CONFIG_SYS_POWER_DEEP_SLEEP_STATES ENABLE_RESTORE_CONTEXT)
if(CONFIG_SOC_QUARK_SE_C1000_SS)
set(SOC_SERIES quark_se)
diff --git a/include/power.h b/include/power.h
index 5eb4d97..ea14a14 100644
--- a/include/power.h
+++ b/include/power.h
@@ -38,7 +38,7 @@
# endif
#endif /* CONFIG_SYS_POWER_LOW_POWER_STATES */
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
# ifdef CONFIG_SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
SYS_POWER_STATE_DEEP_SLEEP,
# endif
@@ -48,7 +48,7 @@
# ifdef CONFIG_SYS_POWER_STATE_DEEP_SLEEP_2_SUPPORTED
SYS_POWER_STATE_DEEP_SLEEP_2,
# endif
-#endif /* CONFIG_SYS_POWER_DEEP_SLEEP */
+#endif /* CONFIG_SYS_POWER_DEEP_SLEEP_STATES */
SYS_POWER_STATE_MAX
};
@@ -101,7 +101,7 @@
static inline bool sys_pm_is_deep_sleep_state(enum power_states state)
{
switch (state) {
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
# ifdef CONFIG_SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
case SYS_POWER_STATE_DEEP_SLEEP:
/* FALLTHROUGH */
@@ -115,7 +115,7 @@
/* FALLTHROUGH */
# endif
return true;
-#endif /* CONFIG_SYS_POWER_DEEP_SLEEP */
+#endif /* CONFIG_SYS_POWER_DEEP_SLEEP_STATES */
default:
return false;
diff --git a/kernel/Kconfig.power_mgmt b/kernel/Kconfig.power_mgmt
index 585c9d7..a61a746 100644
--- a/kernel/Kconfig.power_mgmt
+++ b/kernel/Kconfig.power_mgmt
@@ -48,9 +48,9 @@
the CPU low power states supported by the processor. Generally the one
saving most power.
-config SYS_POWER_DEEP_SLEEP
+config SYS_POWER_DEEP_SLEEP_STATES
bool "Deep Sleep states"
- depends on SYS_POWER_DEEP_SLEEP_SUPPORTED
+ depends on SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED
help
This option enables the kernel to interface with a power manager
application. This permits the system to enter a Deep sleep state
diff --git a/kernel/idle.c b/kernel/idle.c
index 4b40229..0ba6b12 100644
--- a/kernel/idle.c
+++ b/kernel/idle.c
@@ -32,7 +32,7 @@
}
#endif
-#if defined(CONFIG_SYS_POWER_DEEP_SLEEP)
+#if defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES)
void __attribute__((weak)) sys_resume_from_deep_sleep(void)
{
}
@@ -75,7 +75,7 @@
set_kernel_idle_time_in_ticks(ticks);
#if (defined(CONFIG_SYS_POWER_LOW_POWER_STATES) || \
- defined(CONFIG_SYS_POWER_DEEP_SLEEP))
+ defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES))
sys_pm_idle_exit_notify = 1U;
diff --git a/samples/boards/nrf52/power_mgr/prj.conf b/samples/boards/nrf52/power_mgr/prj.conf
index 6b2fe31..d6678e4 100644
--- a/samples/boards/nrf52/power_mgr/prj.conf
+++ b/samples/boards/nrf52/power_mgr/prj.conf
@@ -2,7 +2,7 @@
CONFIG_TIMESLICING=n
CONFIG_SYS_POWER_MANAGEMENT=y
CONFIG_SYS_POWER_LOW_POWER_STATES=y
-CONFIG_SYS_POWER_DEEP_SLEEP=y
+CONFIG_SYS_POWER_DEEP_SLEEP_STATES=y
CONFIG_DEVICE_POWER_MANAGEMENT=y
CONFIG_PM_CONTROL_OS=y
CONFIG_PM_CONTROL_STATE_LOCK=y
diff --git a/samples/boards/nrf52/power_mgr/prj_tickless.conf b/samples/boards/nrf52/power_mgr/prj_tickless.conf
index 9f4807b..bc413eb 100644
--- a/samples/boards/nrf52/power_mgr/prj_tickless.conf
+++ b/samples/boards/nrf52/power_mgr/prj_tickless.conf
@@ -2,7 +2,7 @@
CONFIG_NUM_PREEMPT_PRIORITIES=40
CONFIG_SYS_POWER_MANAGEMENT=y
CONFIG_SYS_POWER_LOW_POWER_STATES=y
-CONFIG_SYS_POWER_DEEP_SLEEP=y
+CONFIG_SYS_POWER_DEEP_SLEEP_STATES=y
CONFIG_DEVICE_POWER_MANAGEMENT=y
CONFIG_TICKLESS_KERNEL=y
CONFIG_GPIO=y
diff --git a/soc/arc/quark_se_c1000_ss/Kconfig.soc b/soc/arc/quark_se_c1000_ss/Kconfig.soc
index 1512631..0fa4f73 100644
--- a/soc/arc/quark_se_c1000_ss/Kconfig.soc
+++ b/soc/arc/quark_se_c1000_ss/Kconfig.soc
@@ -4,7 +4,7 @@
select SYS_POWER_LOW_POWER_STATES_SUPPORTED
select SYS_POWER_STATE_CPU_LPS_SUPPORTED
select SYS_POWER_STATE_CPU_LPS_1_SUPPORTED
- select SYS_POWER_DEEP_SLEEP_SUPPORTED
+ select SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED
select SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
select SYS_POWER_STATE_DEEP_SLEEP_1_SUPPORTED
select SYS_POWER_STATE_DEEP_SLEEP_2_SUPPORTED
diff --git a/soc/arc/quark_se_c1000_ss/power.c b/soc/arc/quark_se_c1000_ss/power.c
index 74eda3d..a294806 100644
--- a/soc/arc/quark_se_c1000_ss/power.c
+++ b/soc/arc/quark_se_c1000_ss/power.c
@@ -17,7 +17,7 @@
#include "ss_power_states.h"
#include "vreg.h"
-#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP))
+#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES))
extern void _power_soc_sleep(void);
extern void _power_soc_deep_sleep(void);
extern void _power_soc_lpss_mode(void);
@@ -50,7 +50,7 @@
qm_ss_power_cpu_ss2();
break;
#endif
-#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP))
+#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES))
case SYS_POWER_STATE_DEEP_SLEEP:
qm_ss_power_soc_lpss_enable();
qm_power_soc_set_ss_restore_flag();
@@ -80,7 +80,7 @@
__builtin_arc_seti(0);
break;
#endif
-#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP))
+#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES))
case SYS_POWER_STATE_DEEP_SLEEP:
qm_ss_power_soc_lpss_disable();
diff --git a/soc/arc/quark_se_c1000_ss/soc_power.S b/soc/arc/quark_se_c1000_ss/soc_power.S
index c3fde6d..831cb96 100644
--- a/soc/arc/quark_se_c1000_ss/soc_power.S
+++ b/soc/arc/quark_se_c1000_ss/soc_power.S
@@ -8,7 +8,7 @@
#include <arch/arc/v2/aux_regs.h>
#include <swap_macros.h>
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
GDATA(_pm_arc_context)
GTEXT(sys_resume_from_deep_sleep)
diff --git a/soc/arm/nordic_nrf/nrf51/Kconfig.series b/soc/arm/nordic_nrf/nrf51/Kconfig.series
index cf7690b..1aada8f 100644
--- a/soc/arm/nordic_nrf/nrf51/Kconfig.series
+++ b/soc/arm/nordic_nrf/nrf51/Kconfig.series
@@ -13,7 +13,7 @@
select NRF_RTC_TIMER
select CLOCK_CONTROL
select CLOCK_CONTROL_NRF
- select SYS_POWER_DEEP_SLEEP_SUPPORTED
+ select SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED
select SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
select XIP
select HAS_CMSIS
diff --git a/soc/arm/nordic_nrf/nrf51/power.c b/soc/arm/nordic_nrf/nrf51/power.c
index 0740f26..6396ce7 100644
--- a/soc/arm/nordic_nrf/nrf51/power.c
+++ b/soc/arm/nordic_nrf/nrf51/power.c
@@ -14,7 +14,7 @@
void sys_set_power_state(enum power_states state)
{
switch (state) {
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
#ifdef CONFIG_SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
case SYS_POWER_STATE_DEEP_SLEEP:
nrf_power_system_off();
@@ -31,7 +31,7 @@
void sys_power_state_post_ops(enum power_states state)
{
switch (state) {
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
#ifdef CONFIG_SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
case SYS_POWER_STATE_DEEP_SLEEP:
/* Nothing to do. */
diff --git a/soc/arm/nordic_nrf/nrf52/Kconfig.series b/soc/arm/nordic_nrf/nrf52/Kconfig.series
index 73db774..63f95e1 100644
--- a/soc/arm/nordic_nrf/nrf52/Kconfig.series
+++ b/soc/arm/nordic_nrf/nrf52/Kconfig.series
@@ -14,7 +14,7 @@
select NRF_RTC_TIMER
select CLOCK_CONTROL
select CLOCK_CONTROL_NRF
- select SYS_POWER_DEEP_SLEEP_SUPPORTED
+ select SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED
select SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
select XIP
select HAS_CMSIS
diff --git a/soc/arm/nordic_nrf/nrf52/power.c b/soc/arm/nordic_nrf/nrf52/power.c
index 0740f26..6396ce7 100644
--- a/soc/arm/nordic_nrf/nrf52/power.c
+++ b/soc/arm/nordic_nrf/nrf52/power.c
@@ -14,7 +14,7 @@
void sys_set_power_state(enum power_states state)
{
switch (state) {
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
#ifdef CONFIG_SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
case SYS_POWER_STATE_DEEP_SLEEP:
nrf_power_system_off();
@@ -31,7 +31,7 @@
void sys_power_state_post_ops(enum power_states state)
{
switch (state) {
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
#ifdef CONFIG_SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
case SYS_POWER_STATE_DEEP_SLEEP:
/* Nothing to do. */
diff --git a/soc/arm/nordic_nrf/nrf91/Kconfig.series b/soc/arm/nordic_nrf/nrf91/Kconfig.series
index 525b952..3ca294c 100644
--- a/soc/arm/nordic_nrf/nrf91/Kconfig.series
+++ b/soc/arm/nordic_nrf/nrf91/Kconfig.series
@@ -16,7 +16,7 @@
select NRF_RTC_TIMER
select CLOCK_CONTROL
select CLOCK_CONTROL_NRF
- select SYS_POWER_DEEP_SLEEP_SUPPORTED
+ select SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED
select SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
select XIP
select HAS_CMSIS
diff --git a/soc/x86/intel_quark/quark_se/Kconfig.series b/soc/x86/intel_quark/quark_se/Kconfig.series
index cce501a..d19ea27 100644
--- a/soc/x86/intel_quark/quark_se/Kconfig.series
+++ b/soc/x86/intel_quark/quark_se/Kconfig.series
@@ -15,7 +15,7 @@
select SYS_POWER_STATE_CPU_LPS_SUPPORTED
select SYS_POWER_STATE_CPU_LPS_1_SUPPORTED
select SYS_POWER_STATE_CPU_LPS_2_SUPPORTED
- select SYS_POWER_DEEP_SLEEP_SUPPORTED
+ select SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED
select SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
select SYS_POWER_STATE_DEEP_SLEEP_1_SUPPORTED
select BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
diff --git a/soc/x86/intel_quark/quark_se/linker.ld b/soc/x86/intel_quark/quark_se/linker.ld
index 5795419..594b979 100644
--- a/soc/x86/intel_quark/quark_se/linker.ld
+++ b/soc/x86/intel_quark/quark_se/linker.ld
@@ -32,7 +32,7 @@
* Since the memory regions area are at fixed address locations, only the
* contiguous unused memory located at the end of RAM should be made available.
*/
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
#define PHYS_RAM_SIZE DT_RAM_SIZE*1K - BSP_SHARED_RAM_SIZE
#else
#ifdef CONFIG_SET_GDT
@@ -50,10 +50,10 @@
#else /* !CONFIG_XIP */
RAM (wx) : ORIGIN = PHYS_LOAD_ADDR, LENGTH = PHYS_RAM_SIZE
#endif /* CONFIG_XIP */
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
BSP_SHARED_RAM (rw) : ORIGIN = CONFIG_BSP_SHARED_RESTORE_INFO_RAM_ADDR,
LENGTH = CONFIG_BSP_SHARED_RESTORE_INFO_SIZE
-#endif /* CONFIG_SYS_POWER_DEEP_SLEEP */
+#endif /* CONFIG_SYS_POWER_DEEP_SLEEP_STATES */
#ifndef CONFIG_SET_GDT
SHARED_GDT_RAM (rw) : ORIGIN = CONFIG_SHARED_GDT_RAM_ADDR,
LENGTH = CONFIG_SHARED_GDT_RAM_SIZE
diff --git a/soc/x86/intel_quark/quark_se/power.c b/soc/x86/intel_quark/quark_se/power.c
index 6416c3a..fcbec7e 100644
--- a/soc/x86/intel_quark/quark_se/power.c
+++ b/soc/x86/intel_quark/quark_se/power.c
@@ -25,7 +25,7 @@
extern void _power_restore_cpu_context(void);
extern void _power_soc_deep_sleep(void);
-#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP))
+#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES))
static u32_t *__x86_restore_info =
(u32_t *)CONFIG_BSP_SHARED_RESTORE_INFO_RAM_ADDR;
@@ -71,7 +71,7 @@
qm_power_cpu_c2lp();
break;
#endif
-#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP))
+#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES))
case SYS_POWER_STATE_DEEP_SLEEP:
case SYS_POWER_STATE_DEEP_SLEEP_1:
_deep_sleep(state);
@@ -93,7 +93,7 @@
__asm__ volatile("sti");
break;
#endif
-#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP))
+#if (defined(CONFIG_SYS_POWER_DEEP_SLEEP_STATES))
case SYS_POWER_STATE_DEEP_SLEEP_1:
#ifdef CONFIG_ARC_INIT
_arc_init(NULL);
diff --git a/soc/x86/intel_quark/quark_se/soc_power.S b/soc/x86/intel_quark/quark_se/soc_power.S
index 3a331b1..e59d76a 100644
--- a/soc/x86/intel_quark/quark_se/soc_power.S
+++ b/soc/x86/intel_quark/quark_se/soc_power.S
@@ -6,7 +6,7 @@
#include <arch/x86/asm.h>
-#ifdef CONFIG_SYS_POWER_DEEP_SLEEP
+#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
GDATA(_pm_save_gdtr)
GDATA(_pm_save_idtr)
GDATA(_pm_save_esp)
diff --git a/soc/x86/intel_quark/quark_x1000/Kconfig.series b/soc/x86/intel_quark/quark_x1000/Kconfig.series
index 526a3cc..510f51d 100644
--- a/soc/x86/intel_quark/quark_x1000/Kconfig.series
+++ b/soc/x86/intel_quark/quark_x1000/Kconfig.series
@@ -7,7 +7,7 @@
select BOOTLOADER_UNKNOWN
select PCI
select SYS_POWER_LOW_POWER_STATES_SUPPORTED
- select SYS_POWER_DEEP_SLEEP_SUPPORTED
+ select SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED
select SOC_FAMILY_QUARK
select HAS_I2C_DW
help
diff --git a/soc/x86/intel_quark/quark_x1000/Kconfig.soc b/soc/x86/intel_quark/quark_x1000/Kconfig.soc
index 272fbbe..d97e2b7 100644
--- a/soc/x86/intel_quark/quark_x1000/Kconfig.soc
+++ b/soc/x86/intel_quark/quark_x1000/Kconfig.soc
@@ -7,7 +7,7 @@
select BOOTLOADER_UNKNOWN
select PCI
select SYS_POWER_LOW_POWER_STATES_SUPPORTED
- select SYS_POWER_DEEP_SLEEP_SUPPORTED
+ select SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED
select HAS_I2C_DW
depends on SOC_SERIES_QUARK_X1000
help