Control.Power.IdlePowerSaver: Add Idle Power Saver Interface

Add idle power saver properties to allow users to control the
idle power saver function. This is part of the Redfish 2021.2 Schema.

Change-Id: I8ef75a938ddb49a9659101d971519ac0297ede56
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/gen/xyz/openbmc_project/Control/Power/IdlePowerSaver/meson.build b/gen/xyz/openbmc_project/Control/Power/IdlePowerSaver/meson.build
new file mode 100644
index 0000000..baec62b
--- /dev/null
+++ b/gen/xyz/openbmc_project/Control/Power/IdlePowerSaver/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+    'xyz/openbmc_project/Control/Power/IdlePowerSaver__cpp'.underscorify(),
+    input: [ '../../../../../../yaml/xyz/openbmc_project/Control/Power/IdlePowerSaver.interface.yaml',  ],
+    output: [ 'server.cpp', 'server.hpp', 'client.hpp',  ],
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'cpp',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../../yaml',
+        'xyz/openbmc_project/Control/Power/IdlePowerSaver',
+    ],
+)
+
diff --git a/gen/xyz/openbmc_project/Control/Power/meson.build b/gen/xyz/openbmc_project/Control/Power/meson.build
index dbd3b40..d7024e3 100644
--- a/gen/xyz/openbmc_project/Control/Power/meson.build
+++ b/gen/xyz/openbmc_project/Control/Power/meson.build
@@ -27,6 +27,20 @@
     ],
 )
 
+subdir('IdlePowerSaver')
+generated_others += custom_target(
+    'xyz/openbmc_project/Control/Power/IdlePowerSaver__markdown'.underscorify(),
+    input: [ '../../../../../yaml/xyz/openbmc_project/Control/Power/IdlePowerSaver.interface.yaml',  ],
+    output: [ 'IdlePowerSaver.md' ],
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'markdown',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../yaml',
+        'xyz/openbmc_project/Control/Power/IdlePowerSaver',
+    ],
+)
+
 subdir('Mode')
 generated_others += custom_target(
     'xyz/openbmc_project/Control/Power/Mode__markdown'.underscorify(),
diff --git a/yaml/xyz/openbmc_project/Control/Power/IdlePowerSaver.interface.yaml b/yaml/xyz/openbmc_project/Control/Power/IdlePowerSaver.interface.yaml
new file mode 100644
index 0000000..28a907c
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Control/Power/IdlePowerSaver.interface.yaml
@@ -0,0 +1,34 @@
+description: >
+    Implement Idle Power Saver capabilities of the system.
+
+properties:
+    - name: Enabled
+      type: boolean
+      description: >
+          This property shall indicate whether idle power save is enabled.
+
+    - name: EnterUtilizationPercent
+      type: byte
+      description: >
+          This property shall indicate the percentage of utilization that the
+          computer system shall be lower than to enter idle power save.
+
+    - name: EnterDwellTime
+      type: uint64
+      description: >
+          This property shall indicate the duration in milliseconds the computer
+          system is below the EnterUtilizationPercent value before the idle
+          power saver is activated.
+
+    - name: ExitUtilizationPercent
+      type: byte
+      description: >
+          This property shall indicate the percentage of utilization that the
+          computer system shall be above than to exit idle power save.
+
+    - name: ExitDwellTime
+      type: uint64
+      description: >
+          This property shall indicate the duration in milliseconds the computer
+          system is above the ExitUtilizationPercent value before the idle
+          power saver is deactivated.