Control.Power.Mode: Add System Power Mode Interface YAML

Define the system power mode interface. This will allow users
to set the power mode for a system.  The power mode defines
how the processor frequency will be set based on power and
performance.  This is part of the Redfish 2021.1 Schema.

Signed-off-by: Chris Cain <cjcain@us.ibm.com>
Change-Id: Ifd1145b1e0a31c9c71e2377de1cb01fcba5a4188
diff --git a/gen/xyz/openbmc_project/Control/Power/Mode/meson.build b/gen/xyz/openbmc_project/Control/Power/Mode/meson.build
new file mode 100644
index 0000000..6c8b615
--- /dev/null
+++ b/gen/xyz/openbmc_project/Control/Power/Mode/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+    'xyz/openbmc_project/Control/Power/Mode__cpp'.underscorify(),
+    input: [ meson.project_source_root() / 'xyz/openbmc_project/Control/Power/Mode.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.project_source_root(),
+        'xyz/openbmc_project/Control/Power/Mode',
+    ],
+)
+
diff --git a/gen/xyz/openbmc_project/Control/Power/meson.build b/gen/xyz/openbmc_project/Control/Power/meson.build
index 165bf98..040e782 100644
--- a/gen/xyz/openbmc_project/Control/Power/meson.build
+++ b/gen/xyz/openbmc_project/Control/Power/meson.build
@@ -29,6 +29,21 @@
     build_by_default: true,
 )
 
+subdir('Mode')
+generated_others += custom_target(
+    'xyz/openbmc_project/Control/Power/Mode__markdown'.underscorify(),
+    input: [ meson.project_source_root() / 'xyz/openbmc_project/Control/Power/Mode.interface.yaml',  ],
+    output: [ 'Mode.md' ],
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'markdown',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.project_source_root(),
+        'xyz/openbmc_project/Control/Power/Mode',
+    ],
+    build_by_default: true,
+)
+
 subdir('RestorePolicy')
 generated_others += custom_target(
     'xyz/openbmc_project/Control/Power/RestorePolicy__markdown'.underscorify(),
diff --git a/xyz/openbmc_project/Control/Power/Mode.interface.yaml b/xyz/openbmc_project/Control/Power/Mode.interface.yaml
new file mode 100644
index 0000000..0077d65
--- /dev/null
+++ b/xyz/openbmc_project/Control/Power/Mode.interface.yaml
@@ -0,0 +1,34 @@
+description: >
+    Customer requested system power mode.
+
+properties:
+    - name: PowerMode
+      type: enum[self.PowerMode]
+      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.
+
+enumerations:
+    - name: PowerMode
+      description: >
+        Possible Power Mode settings
+      values:
+        - name: Static
+          description: >
+              This value shall indicate the system performs at a static base
+              speed.
+        - name: PowerSaving
+          description: >
+              This value shall indicate the system performs at reduced speeds
+              to save power. This mode should be used when power saving is the
+              top priority.
+        - name: MaximumPerformance
+          decription: >
+              This value shall indicate the system performs at the highest
+              speeds possible. This mode should be used when performance is
+              the top priority.
+        - name: OEM
+          description: >
+              This value shall indicate the system performs at an OEM-defined
+              power mode.