GPIO valve: add configuration interface
Add configuration interface for GPIO based valve where the valve's open
status is depicted by a GPIO. This configuration will be consumed by
ValveMonitor service which will be added to dbus-sensors repository.
Change-Id: I79374eba4fd80e2fe3876aad1c47cbefb72c93ca
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/gen/xyz/openbmc_project/Configuration/GPIOValve/meson.build b/gen/xyz/openbmc_project/Configuration/GPIOValve/meson.build
new file mode 100644
index 0000000..a76ef90
--- /dev/null
+++ b/gen/xyz/openbmc_project/Configuration/GPIOValve/meson.build
@@ -0,0 +1,40 @@
+# Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Configuration/GPIOValve'
+
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Configuration/GPIOValve__cpp'.underscorify(),
+ input: [
+ '../../../../../yaml/xyz/openbmc_project/Configuration/GPIOValve.interface.yaml',
+ ],
+ output: [
+ 'common.hpp',
+ 'server.hpp',
+ 'server.cpp',
+ 'aserver.hpp',
+ 'client.hpp',
+ ],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog,
+ '--command',
+ 'cpp',
+ '--output',
+ meson.current_build_dir(),
+ '--tool',
+ sdbusplusplus_prog,
+ '--directory',
+ meson.current_source_dir() / '../../../../../yaml',
+ 'xyz/openbmc_project/Configuration/GPIOValve',
+ ],
+ install: should_generate_cpp,
+ install_dir: [
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ false,
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ ],
+ build_by_default: should_generate_cpp,
+)
+
diff --git a/gen/xyz/openbmc_project/Configuration/meson.build b/gen/xyz/openbmc_project/Configuration/meson.build
index 6da091a..bbdb8e1 100644
--- a/gen/xyz/openbmc_project/Configuration/meson.build
+++ b/gen/xyz/openbmc_project/Configuration/meson.build
@@ -1,6 +1,7 @@
# Generated file; do not modify.
subdir('GPIODeviceDetect')
subdir('GPIOLeakDetector')
+subdir('GPIOValve')
sdbusplus_current_path = 'xyz/openbmc_project/Configuration'
@@ -52,3 +53,27 @@
build_by_default: should_generate_markdown,
)
+generated_markdown += custom_target(
+ 'xyz/openbmc_project/Configuration/GPIOValve__markdown'.underscorify(),
+ input: [
+ '../../../../yaml/xyz/openbmc_project/Configuration/GPIOValve.interface.yaml',
+ ],
+ output: ['GPIOValve.md'],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog,
+ '--command',
+ 'markdown',
+ '--output',
+ meson.current_build_dir(),
+ '--tool',
+ sdbusplusplus_prog,
+ '--directory',
+ meson.current_source_dir() / '../../../../yaml',
+ 'xyz/openbmc_project/Configuration/GPIOValve',
+ ],
+ install: should_generate_markdown,
+ install_dir: [inst_markdown_dir / sdbusplus_current_path],
+ build_by_default: should_generate_markdown,
+)
+
diff --git a/yaml/xyz/openbmc_project/Configuration/GPIOValve.interface.yaml b/yaml/xyz/openbmc_project/Configuration/GPIOValve.interface.yaml
new file mode 100644
index 0000000..12c476e
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Configuration/GPIOValve.interface.yaml
@@ -0,0 +1,38 @@
+description: >
+ Implement to provide entity manager configuration for the gpio based valve.
+
+properties:
+ - name: Type
+ type: string
+ description: >
+ The type of configuration object.
+ flags:
+ - readonly
+ - name: Name
+ type: string
+ description: >
+ The name of the valve.
+ flags:
+ - readonly
+ - name: OpenPinName
+ type: string
+ description: >
+ The name of the GPIO pin that shows the valve's open status.
+ flags:
+ - readonly
+ - name: OpenPolarity
+ type: string
+ description: >
+ The GPIO polarity depicting valve's open status.
+ flags:
+ - readonly
+ - name: OpenControlPinName
+ type: string
+ description: >
+ The name of the GPIO pin that controls opening the valve.
+ flags:
+ - readonly
+ - name: OpenControlValue
+ type: boolean
+ description: >
+ The GPIO value to set to open the valve.