Configuration: Add GPIODeviceDetect interface
configuration interface for gpio-presence daemon.
As defined in the design document for gpio hw inventory [1]
References:
[1] https://github.com/openbmc/docs/blob/abbf7355231fbd9d5231e136780c167f2a89494e/designs/inventory/gpio-based-hardware-inventory.md
Change-Id: I01b002623125de258366779a656592c0840a6d89
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/gen/xyz/openbmc_project/Configuration/GPIODeviceDetect/meson.build b/gen/xyz/openbmc_project/Configuration/GPIODeviceDetect/meson.build
new file mode 100644
index 0000000..4dd10f5
--- /dev/null
+++ b/gen/xyz/openbmc_project/Configuration/GPIODeviceDetect/meson.build
@@ -0,0 +1,35 @@
+# Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Configuration/GPIODeviceDetect'
+
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Configuration/GPIODeviceDetect__cpp'.underscorify(),
+ input: [
+ '../../../../../yaml/xyz/openbmc_project/Configuration/GPIODeviceDetect.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/GPIODeviceDetect',
+ ],
+ 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
new file mode 100644
index 0000000..9f5cc12
--- /dev/null
+++ b/gen/xyz/openbmc_project/Configuration/meson.build
@@ -0,0 +1,22 @@
+# Generated file; do not modify.
+subdir('GPIODeviceDetect')
+
+sdbusplus_current_path = 'xyz/openbmc_project/Configuration'
+
+generated_markdown += custom_target(
+ 'xyz/openbmc_project/Configuration/GPIODeviceDetect__markdown'.underscorify(),
+ input: [ '../../../../yaml/xyz/openbmc_project/Configuration/GPIODeviceDetect.interface.yaml', ],
+ output: [ 'GPIODeviceDetect.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/GPIODeviceDetect',
+ ],
+ install: should_generate_markdown,
+ install_dir: [inst_markdown_dir / sdbusplus_current_path],
+ build_by_default: should_generate_markdown,
+)
+
diff --git a/gen/xyz/openbmc_project/meson.build b/gen/xyz/openbmc_project/meson.build
index 094d425..7e314f4 100644
--- a/gen/xyz/openbmc_project/meson.build
+++ b/gen/xyz/openbmc_project/meson.build
@@ -8,6 +8,7 @@
subdir('Collection')
subdir('Common')
subdir('Condition')
+subdir('Configuration')
subdir('Console')
subdir('Control')
subdir('Debug')
diff --git a/yaml/xyz/openbmc_project/Configuration/GPIODeviceDetect.interface.yaml b/yaml/xyz/openbmc_project/Configuration/GPIODeviceDetect.interface.yaml
new file mode 100644
index 0000000..fad8661
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Configuration/GPIODeviceDetect.interface.yaml
@@ -0,0 +1,18 @@
+description: >
+ Information to enable a daemon to probe hardware based on gpio values
+properties:
+ - name: Name
+ type: string
+ description: >
+ Used by entity-manager to identify which hw was detected. For internal
+ use by entity-manager.
+ - name: PresencePinNames
+ type: array[string]
+ description: >
+ Names of the gpio lines.
+ - name: PresencePinValues
+ type: array[uint64]
+ description: >
+ Values of the gpio lines for which a device is considered present.
+ Choosing 'uint64' instead of 'bool' here for compatibility with how EM
+ exposes configuration on dbus.