Skip to content

Commit 81b5e9b

Browse files
committed
kernel: ensure System Power Managment enables Tickless Idle.
System Power Management is only supported in Tickless Idle mode. This patch modifies Kconfig dependencies to ensure System Power Management option selects Tickless Idle one. Fixes: zephyrproject-rtos#11046 Signed-off-by: Piotr Mienkowski <[email protected]>
1 parent 917711f commit 81b5e9b

File tree

15 files changed

+8
-19
lines changed

15 files changed

+8
-19
lines changed

doc/subsystems/power_management.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@ System Power Management
9292

9393
This consists of the hook functions that the power management subsystem calls
9494
when the kernel enters and exits the idle state, in other words, when the kernel
95-
has nothing to schedule. This section provides a general overview of the hook
96-
functions. Refer to :ref:`power_management_api` for the detailed description of
97-
the APIs.
95+
has nothing to schedule. Enabling system power management compels Zephyr kernel
96+
scheduler to work in tickless idle mode (see :option:`CONFIG_TICKLESS_IDLE`).
97+
98+
This section provides a general overview of the hook functions. Refer to
99+
:ref:`power_management_api` for the detailed description of the APIs.
98100

99101
Suspend Hook function
100102
=====================

kernel/Kconfig.power_mgmt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
menuconfig SYS_POWER_MANAGEMENT
99
bool "Power management"
10+
select TICKLESS_IDLE
1011
help
1112
This option enables the board to implement extra power management
1213
policies whenever the kernel becomes idle. The kernel informs the
@@ -59,6 +60,8 @@ config SYS_POWER_DEEP_SLEEP
5960
from the reset vector same as cold boot. The interface allows
6061
restoration of states that were saved at the time of suspend.
6162

63+
endif # SYS_POWER_MANAGEMENT
64+
6265
config DEVICE_POWER_MANAGEMENT
6366
bool "Device power management"
6467
help
@@ -69,5 +72,3 @@ config DEVICE_POWER_MANAGEMENT
6972
device drivers to do any necessary power management operations
7073
like turning off device clocks and peripherals. The device drivers
7174
may also save and restore states in these hook functions.
72-
73-
endif

samples/boards/nrf52/power_mgr/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ CONFIG_SYS_POWER_MANAGEMENT=y
22
CONFIG_SYS_POWER_LOW_POWER_STATE=y
33
CONFIG_SYS_POWER_DEEP_SLEEP=y
44
CONFIG_DEVICE_POWER_MANAGEMENT=y
5-
CONFIG_TICKLESS_IDLE=y
65
CONFIG_GPIO=y

samples/boards/nrf52/power_mgr/prj_tickless.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ CONFIG_SYS_POWER_LOW_POWER_STATE=y
55
CONFIG_SYS_POWER_DEEP_SLEEP=y
66
CONFIG_DEVICE_POWER_MANAGEMENT=y
77
CONFIG_TICKLESS_KERNEL=y
8-
CONFIG_TICKLESS_IDLE=y
98
CONFIG_GPIO=y

samples/boards/quark_se_c1000/power_mgr/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ CONFIG_SYS_POWER_MANAGEMENT=y
22
CONFIG_SYS_POWER_LOW_POWER_STATE=y
33
CONFIG_SYS_POWER_DEEP_SLEEP=y
44
CONFIG_DEVICE_POWER_MANAGEMENT=y
5-
CONFIG_TICKLESS_IDLE=y
65
CONFIG_RTC=y
76
CONFIG_GPIO=y

samples/boards/quark_se_c1000/power_mgr/prj_tickless.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ CONFIG_NUM_COOP_PRIORITIES=29
44
CONFIG_NUM_PREEMPT_PRIORITIES=40
55

66
CONFIG_SYS_POWER_MANAGEMENT=y
7-
CONFIG_TICKLESS_IDLE=y
87
CONFIG_TICKLESS_KERNEL=y
98

109
CONFIG_SYS_POWER_MANAGEMENT=y
1110
CONFIG_SYS_POWER_LOW_POWER_STATE=y
1211
CONFIG_SYS_POWER_DEEP_SLEEP=y
1312
CONFIG_DEVICE_POWER_MANAGEMENT=y
14-
CONFIG_TICKLESS_IDLE=y
1513
CONFIG_RTC=y
1614
CONFIG_GPIO=y

samples/philosophers/prj_tickless.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ CONFIG_NUM_COOP_PRIORITIES=29
55
CONFIG_NUM_PREEMPT_PRIORITIES=40
66

77
CONFIG_SYS_POWER_MANAGEMENT=y
8-
CONFIG_TICKLESS_IDLE=y
98
CONFIG_TICKLESS_KERNEL=y

samples/subsys/power/power_mgr/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ CONFIG_SYS_POWER_MANAGEMENT=y
22
CONFIG_SYS_POWER_LOW_POWER_STATE=y
33
CONFIG_SYS_POWER_DEEP_SLEEP=y
44
CONFIG_DEVICE_POWER_MANAGEMENT=y
5-
CONFIG_TICKLESS_IDLE=y
65

76
CONFIG_PM_CONTROL_OS=y
87
CONFIG_PM_POLICY_RESIDENCY=y

samples/subsys/power/power_mgr/prj_tickless.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ CONFIG_SYS_POWER_LOW_POWER_STATE=y
55
CONFIG_SYS_POWER_DEEP_SLEEP=y
66
CONFIG_DEVICE_POWER_MANAGEMENT=y
77
CONFIG_TICKLESS_KERNEL=y
8-
CONFIG_TICKLESS_IDLE=y
98

109
CONFIG_PM_CONTROL_OS=y
1110
CONFIG_PM_POLICY_RESIDENCY=y

tests/kernel/profiling/profiling_api/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ CONFIG_TEST_HW_STACK_PROTECTION=n
88
# to check idle thread
99
CONFIG_SYS_POWER_MANAGEMENT=y
1010
CONFIG_SYS_POWER_LOW_POWER_STATE=y
11-
CONFIG_TICKLESS_IDLE=y
1211
CONFIG_IDLE_STACK_SIZE=512
1312

1413
# to check isr
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
CONFIG_ZTEST=y
22
CONFIG_SYS_POWER_MANAGEMENT=y
3-
CONFIG_TICKLESS_IDLE=y
43
CONFIG_TICKLESS_IDLE_THRESH=20

tests/power/multicore/arc/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ CONFIG_SYS_POWER_MANAGEMENT=y
33
CONFIG_SYS_POWER_DEEP_SLEEP=y
44
CONFIG_SYS_POWER_LOW_POWER_STATE=y
55
CONFIG_DEVICE_POWER_MANAGEMENT=y
6-
CONFIG_TICKLESS_IDLE=y
76
CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_0"
87
CONFIG_IPM=y
98
CONFIG_IPM_QUARK_SE=y

tests/power/multicore/lmt/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ CONFIG_SYS_POWER_MANAGEMENT=y
33
CONFIG_SYS_POWER_DEEP_SLEEP=y
44
CONFIG_SYS_POWER_LOW_POWER_STATE=y
55
CONFIG_DEVICE_POWER_MANAGEMENT=y
6-
CONFIG_TICKLESS_IDLE=y
76
CONFIG_ARC_INIT=y
87
CONFIG_RTC=y
98
CONFIG_IPM=y

tests/power/power_states/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ CONFIG_SYS_POWER_MANAGEMENT=y
33
CONFIG_SYS_POWER_DEEP_SLEEP=y
44
CONFIG_SYS_POWER_LOW_POWER_STATE=y
55
CONFIG_DEVICE_POWER_MANAGEMENT=y
6-
CONFIG_TICKLESS_IDLE=y
76

87
# RTC Wake Event
98
CONFIG_RTC=y

tests/power/power_states/prj_tickless.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ CONFIG_SYS_POWER_MANAGEMENT=y
22
CONFIG_SYS_POWER_LOW_POWER_STATE=y
33
CONFIG_SYS_POWER_DEEP_SLEEP=y
44
CONFIG_DEVICE_POWER_MANAGEMENT=y
5-
CONFIG_TICKLESS_IDLE=y
65
CONFIG_TICKLESS_KERNEL=y
76
CONFIG_RTC=y
87
CONFIG_GPIO=y

0 commit comments

Comments
 (0)