1# Copyright (c) 2014-2015 Wind River Systems, Inc. 2# Copyright (c) 2016 Intel Corporation 3# SPDX-License-Identifier: Apache-2.0 4 5menu "Power Management" 6 7config HAS_PM 8 bool 9 help 10 This option must be selected by SoCs that provide PM hooks, that is, 11 calls to configure low-power states. 12 13config PM 14 bool "System Power Management" 15 depends on SYS_CLOCK_EXISTS && HAS_PM 16 help 17 This option enables the board to implement extra power management 18 policies whenever the kernel becomes idle. The kernel informs the 19 power management subsystem of the number of ticks until the next kernel 20 timer is due to expire. 21 22if PM 23 24module = PM 25module-str = System Power Management 26source "subsys/logging/Kconfig.template.log_config" 27 28config PM_STATS 29 bool "System Power Management Stats" 30 depends on STATS 31 help 32 Enable System Power Management Stats. 33 34config PM_S2RAM 35 bool "Suspend-to-RAM (S2RAM)" 36 depends on ARCH_HAS_SUSPEND_TO_RAM 37 help 38 This option enables suspend-to-RAM (S2RAM). 39 40config PM_S2RAM_CUSTOM_MARKING 41 bool "Use custom marking functions" 42 depends on PM_S2RAM 43 help 44 By default a magic word in RAM is used to mark entering suspend-to-RAM. Enabling 45 this option allows custom implementation of functions which handles the marking. 46 47config PM_NEED_ALL_DEVICES_IDLE 48 bool "System Low Power Mode Needs All Devices Idle" 49 depends on PM_DEVICE && !SMP 50 help 51 When this option is enabled, check that no devices are busy before 52 entering into system low power mode. 53 54choice PM_POLICY 55 prompt "Idle State Power Management Policy" 56 default PM_POLICY_DEFAULT 57 help 58 Select the idle state power management policy. 59 60config PM_POLICY_DEFAULT 61 bool "Default PM policy" 62 help 63 This option selects the default PM policy. Default policy is based 64 on CPU residency times and other constraints imposed by the drivers or 65 application. 66 67config PM_POLICY_CUSTOM 68 bool "Custom PM Policy" 69 help 70 This options allows applications to override the default policy with 71 a custom implementation. 72 73endchoice 74 75config PM_POLICY_DEVICE_CONSTRAINTS 76 bool "Power state constraints per device" 77 help 78 This option allows devices to have a list of power states 79 that when the system transition to them, cause power loss in the device. 80 This used to set and release power state constraints when 81 it is needed by the device. 82 83endif # PM 84 85config PM_DEVICE 86 bool "Device Power Management" 87 help 88 This option enables the device power management interface. The 89 interface implemented by device drivers are called by the power 90 management subsystem. This allows device drivers to do any 91 necessary power management operations like turning off 92 device clocks and peripherals. Device drivers may also save 93 and restore states in these hook functions. 94 95if PM_DEVICE 96 97module = PM_DEVICE 98module-str = Device Power Management 99source "subsys/logging/Kconfig.template.log_config" 100 101config PM_DEVICE_POWER_DOMAIN 102 bool "Power domain" 103 depends on PM_DEVICE 104 default y 105 help 106 Enable support for Power Domain. With power domain enabled, 107 devices that depend on a domain will be notified when this 108 domain is suspended or resumed. 109 110config PM_DEVICE_POWER_DOMAIN_DYNAMIC 111 bool "Dynamically bind devices to a Power Domain" 112 depends on PM_DEVICE_POWER_DOMAIN && DEVICE_DEPS_DYNAMIC 113 help 114 Enable support for dynamically bind devices to a Power Domain. 115 116config PM_DEVICE_POWER_DOMAIN_DYNAMIC_NUM 117 int "Number of devices that can dynamically be bind to a Power Domain" 118 depends on PM_DEVICE_POWER_DOMAIN_DYNAMIC 119 default 1 120 help 121 The number of devices that can dynamically be bind to a Power Domain. 122 123config PM_DEVICE_RUNTIME 124 bool "Runtime Device Power Management" 125 select EVENTS 126 help 127 Enable Runtime Power Management to save power. With device runtime PM 128 enabled, devices can be suspended or resumed based on the device 129 usage even while the CPU or system is running. 130 131config PM_DEVICE_RUNTIME_EXCLUSIVE 132 depends on PM_DEVICE_RUNTIME 133 bool "[DEPRECATED] Use only on Runtime Power Management on system suspend / resume" 134 select DEPRECATED 135 help 136 On system suspend / resume do not trigger the Device PM hooks but 137 only rely on Runtime PM to manage the devices power states. 138 139config PM_DEVICE_SHELL 140 bool "Device Power Management shell" 141 depends on SHELL 142 help 143 Enable the device power management shell, for triggering device power 144 management events through the shell interface. 145 146config PM_DEVICE_SYSTEM_MANAGED 147 bool "System-Managed Device Power Management" 148 default y if !PM_DEVICE_RUNTIME_EXCLUSIVE && !PM_DEVICE_RUNTIME 149 help 150 This option enables the system-managed device power 151 management. The power management subsystem will suspend 152 devices before entering a low power state. Conversely, after 153 the core wakes up from low power mode all suspended devices 154 are resumed. 155 156 157endif # PM_DEVICE 158 159endmenu 160