Add Host selector yaml configuration

Host selector interface is used to keep the position
of the host selector HW switch as a property.
This host selector position value decides which host
or bmc is currently selected in a multihost bmc system
so that the power and reset button events are
routed to the currently selected host or bmc's power control events.

Tested:
  It's tested in Facebook multi-host Yosemitev2 system,
including in the Front panel with its selector button.

Signed-off-by: Manikandan Elumalai <manikandan.hcl.ers.epl@gmail.com>
Change-Id: I18b4bd779c467d7ddc5045c5380d93c1b8a73b74
diff --git a/gen/xyz/openbmc_project/Chassis/Buttons/HostSelector/meson.build b/gen/xyz/openbmc_project/Chassis/Buttons/HostSelector/meson.build
new file mode 100644
index 0000000..2960054
--- /dev/null
+++ b/gen/xyz/openbmc_project/Chassis/Buttons/HostSelector/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+    'xyz/openbmc_project/Chassis/Buttons/HostSelector__cpp'.underscorify(),
+    input: [ '../../../../../../yaml/xyz/openbmc_project/Chassis/Buttons/HostSelector.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/Chassis/Buttons/HostSelector',
+    ],
+)
+
diff --git a/gen/xyz/openbmc_project/Chassis/Buttons/meson.build b/gen/xyz/openbmc_project/Chassis/Buttons/meson.build
index 1f2d193..994214a 100644
--- a/gen/xyz/openbmc_project/Chassis/Buttons/meson.build
+++ b/gen/xyz/openbmc_project/Chassis/Buttons/meson.build
@@ -1,4 +1,18 @@
 # Generated file; do not modify.
+subdir('HostSelector')
+generated_others += custom_target(
+    'xyz/openbmc_project/Chassis/Buttons/HostSelector__markdown'.underscorify(),
+    input: [ '../../../../../yaml/xyz/openbmc_project/Chassis/Buttons/HostSelector.interface.yaml',  ],
+    output: [ 'HostSelector.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/Chassis/Buttons/HostSelector',
+    ],
+)
+
 subdir('ID')
 generated_others += custom_target(
     'xyz/openbmc_project/Chassis/Buttons/ID__markdown'.underscorify(),
diff --git a/yaml/xyz/openbmc_project/Chassis/Buttons/HostSelector.interface.yaml b/yaml/xyz/openbmc_project/Chassis/Buttons/HostSelector.interface.yaml
new file mode 100644
index 0000000..397460e
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Chassis/Buttons/HostSelector.interface.yaml
@@ -0,0 +1,22 @@
+description: >
+    Host selector interface is used to keep the position of the host
+    selector HW switch as a property.This host selector position value
+    decides which host or bmc is currently selected in a multihost bmc
+    system so that the power and reset button events are routed to
+    the currently selected host or bmc's power control events.
+
+properties:
+    - name: Position
+      type: size
+      default: 0
+      description: >
+        The current position of the selector. Position 1 to N selects
+        Host Instance t to N,Position 0 selects the BMC
+        ( N is maximum number of hosts ).
+    - name: MaxPosition
+      type: size
+      default: 0
+      flags:
+          - readonly
+      description: >
+        Maximum number for position value.
diff --git a/yaml/xyz/openbmc_project/Chassis/README.md b/yaml/xyz/openbmc_project/Chassis/README.md
index d07a939..cc2ccdf 100644
--- a/yaml/xyz/openbmc_project/Chassis/README.md
+++ b/yaml/xyz/openbmc_project/Chassis/README.md
@@ -36,4 +36,12 @@
 
 #### signals
 * Released - Reset button released signal.
-* Pressed - Reset button pressed signal.
\ No newline at end of file
+* Pressed - Reset button pressed signal.
+
+### Host Selector Button Interface
+Selector button interface `xyz.openbmc_project.Chassis.Buttons.HostSelector`
+provides following property.
+
+### properties
+Position - Value of the Host selector.
+MaxPosition - Max value that the Position value can hold.
\ No newline at end of file