Control.Power.Mode: Add AllowedPowerModes property
Add new property that defines what Power Modes are supported.
Tested on Rainier.
'''
busctl -l introspect org.open_power.OCC.Control /xyz/openbmc_project/control/host0/power_mode
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.Control.Power.Mode interface - - -
.AllowedPowerModes property as 3 "xyz.openbmc_project.Control.Power.Mode.PowerMode.Static" "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.PowerSaving" const
.PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable
.SafeMode property b false emits-change
'''
Change-Id: I4b8285adaabb2aa42592e73f259d9636832f904b
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/yaml/xyz/openbmc_project/Control/Power/Mode.interface.yaml b/yaml/xyz/openbmc_project/Control/Power/Mode.interface.yaml
index 1050255..54fe794 100644
--- a/yaml/xyz/openbmc_project/Control/Power/Mode.interface.yaml
+++ b/yaml/xyz/openbmc_project/Control/Power/Mode.interface.yaml
@@ -4,10 +4,12 @@
properties:
- name: PowerMode
type: enum[self.PowerMode]
+ default: Static
description: >
This property shall contain the computer system power mode setting.
This defines the processor speed based on the priority of power
consumption and performance.
+
- name: SafeMode
type: boolean
flags:
@@ -17,6 +19,16 @@
This property shall indicate whether the System is in Safe Mode. When
this is true, the system power mode is not being used in the system.
+ - name: AllowedPowerModes
+ type: set[enum[self.PowerMode]]
+ flags:
+ - const
+ description: >
+ A const property describing all the allowed power modes. Some systems
+ may not support all modes, so this property can be filled in with only
+ the supported modes. If empty, then any of the PowerMode values can be
+ set.
+
enumerations:
- name: PowerMode
description: >