Add systemd units for new phosphor-multi-gpio-monitor
Also added sample phosphor-multi-gpio-monitor.json for
configuration of list of GPIO to be monitored. Platform
specific file can be added through bbappend file.
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
Change-Id: I3a2fac155be4583aeee52f018da6be0b506633fd
diff --git a/meson.build b/meson.build
index 0f94b29..b5e6529 100644
--- a/meson.build
+++ b/meson.build
@@ -39,12 +39,28 @@
configure_file(
copy: true,
+ input: 'phosphor-multi-gpio-monitor.service',
+ install: true,
+ install_dir: systemd_system_unit_dir,
+ output: 'phosphor-multi-gpio-monitor.service'
+)
+
+configure_file(
+ copy: true,
input: 'phosphor-gpio-presence@.service',
install: true,
install_dir: systemd_system_unit_dir,
output: 'phosphor-gpio-presence@.service'
)
+configure_file(
+ copy: true,
+ input: 'phosphor-multi-gpio-monitor.json',
+ install: true,
+ install_dir: '/usr/share/phosphor-gpio-monitor',
+ output: 'phosphor-multi-gpio-monitor.json'
+)
+
libevdev_o = static_library(
'libevdev_o',
'evdev.cpp',
diff --git a/phosphor-multi-gpio-monitor.json b/phosphor-multi-gpio-monitor.json
new file mode 100644
index 0000000..3508995
--- /dev/null
+++ b/phosphor-multi-gpio-monitor.json
@@ -0,0 +1,14 @@
+[
+ {
+ "Name": "PowerButton",
+ "LineName": "POWER_BUTTON",
+ "EventMon": "BOTH",
+ "Continue": true
+ },
+ {
+ "Name": "PowerGood",
+ "ChipId": "0",
+ "GpioNum": 14,
+ "Continue": true
+ }
+]
diff --git a/phosphor-multi-gpio-monitor.service b/phosphor-multi-gpio-monitor.service
new file mode 100644
index 0000000..619f2da
--- /dev/null
+++ b/phosphor-multi-gpio-monitor.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Phosphor Multi GPIO monitor
+
+[Service]
+Restart=no
+ExecStart=/usr/bin/phosphor-multi-gpio-monitor --config /usr/share/phosphor-gpio-monitor/phosphor-multi-gpio-monitor.json