subsys: power: Add support for pluggable PM policies
Add support for adding and selecting pluggable PM policies which can be enabled based on the application needs. Also added a dummy policy for demonstration purpose which simply loops over the supported PM states. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
This commit is contained in:
parent
f0a2f2b423
commit
c511857f57
9 changed files with 158 additions and 97 deletions
|
@ -2,87 +2,7 @@
|
|||
if PM_CONTROL_OS
|
||||
menu "OS Power Management"
|
||||
|
||||
if SYS_POWER_LOW_POWER_STATE
|
||||
config PM_CONTROL_OS_LPS
|
||||
bool "Platform supports LPS"
|
||||
help
|
||||
Select this option if SoC support LPS state.
|
||||
|
||||
if PM_CONTROL_OS_LPS
|
||||
config PM_LPS_MIN_RES
|
||||
int "LPS minimum residency"
|
||||
default 5
|
||||
help
|
||||
Minimum residency in ticks to enter LPS state.
|
||||
endif
|
||||
|
||||
config PM_CONTROL_OS_LPS_1
|
||||
bool "Platform supports LPS_1"
|
||||
help
|
||||
Select this option if SoC support LPS_1 state.
|
||||
|
||||
if PM_CONTROL_OS_LPS_1
|
||||
config PM_LPS_1_MIN_RES
|
||||
int "LPS_1 minimum residency"
|
||||
default 10
|
||||
help
|
||||
Minimum residency in ticks to enter LPS_1 state.
|
||||
endif
|
||||
|
||||
config PM_CONTROL_OS_LPS_2
|
||||
bool "Platform supports LPS_2"
|
||||
help
|
||||
Select this option if SoC support LPS_2 state.
|
||||
|
||||
if PM_CONTROL_OS_LPS_2
|
||||
config PM_LPS_2_MIN_RES
|
||||
int "LPS_2 minimum residency"
|
||||
default 30
|
||||
help
|
||||
Minimum residency in ticks to enter LPS_2 state.
|
||||
endif
|
||||
endif # SYS_POWER_LOW_POWER_STATE
|
||||
|
||||
if SYS_POWER_DEEP_SLEEP
|
||||
config PM_CONTROL_OS_DEEP_SLEEP
|
||||
bool "Platform supports DEEP_SLEEP"
|
||||
help
|
||||
Select this option if SoC support DEEP_SLEEP state.
|
||||
|
||||
if PM_CONTROL_OS_DEEP_SLEEP
|
||||
config PM_DEEP_SLEEP_MIN_RES
|
||||
int "DEEP_SLEEP minimum residency"
|
||||
default 60
|
||||
help
|
||||
Minimum residency in ticks to enter DEEP_SLEEP state.
|
||||
endif
|
||||
|
||||
config PM_CONTROL_OS_DEEP_SLEEP_1
|
||||
bool "Platform supports DEEP_SLEEP_1"
|
||||
help
|
||||
Select this option if SoC support DEEP_SLEEP_1 state.
|
||||
|
||||
if PM_CONTROL_OS_DEEP_SLEEP_1
|
||||
config PM_DEEP_SLEEP_1_MIN_RES
|
||||
int "DEEP_SLEEP_1 minimum residency"
|
||||
default 90
|
||||
help
|
||||
Minimum residency in ticks to enter DEEP_SLEEP_1 state.
|
||||
endif
|
||||
|
||||
config PM_CONTROL_OS_DEEP_SLEEP_2
|
||||
bool "Platform supports DEEP_SLEEP_2"
|
||||
help
|
||||
Select this option if SoC support DEEP_SLEEP_2 state.
|
||||
|
||||
if PM_CONTROL_OS_DEEP_SLEEP_2
|
||||
config PM_DEEP_SLEEP_2_MIN_RES
|
||||
int "DEEP_SLEEP_2 minimum residency"
|
||||
default 120
|
||||
help
|
||||
Minimum residency in ticks to enter DEEP_SLEEP_2 state.
|
||||
endif
|
||||
endif # PM_CONTROL_OS_DEEP_SLEEP
|
||||
source "subsys/power/policy/Kconfig"
|
||||
|
||||
endmenu
|
||||
endif # PM_CONTROL_OS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue