summaryrefslogtreecommitdiffstats
path: root/meta-phosphor
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-04-28 15:35:10 +0530
committerPatrick Williams <patrick@stwcx.xyz>2017-05-31 01:38:35 +0000
commit3de840555579b6d81f33c4ab187e76dfefc41a69 (patch)
tree8d71c5f5bf9728a720ca4a7b91eda37ce724b3d8 /meta-phosphor
parent19a135fae2d0b836c5a112ab1657f37ad27f66a3 (diff)
downloadtalos-openbmc-3de840555579b6d81f33c4ab187e76dfefc41a69.tar.gz
talos-openbmc-3de840555579b6d81f33c4ab187e76dfefc41a69.zip
Add recipe file for phosphor-gpio-monitor
phosphor-gpio-monitor is a generic GPIO monitor application which can be used for any purpose where a GPIO needs to be monitored for certain state. Due to this need, it has been added to obmc package group. Change-Id: I8e11e8d5567d6f4c56479b335d1f6bd9b39401fd Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'meta-phosphor')
-rw-r--r--meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor.bb25
-rw-r--r--meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-monitor@.service8
-rw-r--r--meta-phosphor/conf/distro/include/phosphor-defaults.inc7
3 files changed, 40 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor.bb b/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor.bb
new file mode 100644
index 000000000..e019ed01e
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Phosphor GPIO monitor application"
+DESCRIPTION = "Application to monitor gpio assertions"
+HOMEPAGE = "http://github.com/openbmc/phosphor-gpio-monitor"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+inherit autotools pkgconfig
+inherit obmc-phosphor-dbus-service
+
+RPROVIDES_${PN} += "virtual/obmc-gpio-monitor"
+PROVIDES += "virtual/obmc-gpio-monitor"
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "sdbusplus sdbusplus-native"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "phosphor-logging"
+RDEPENDS_${PN} += "libsystemd"
+RDEPENDS_${PN} += "phosphor-logging"
+
+SYSTEMD_SERVICE_${PN} += "phosphor-gpio-monitor@.service"
+
+SRC_URI += "git://github.com/openbmc/phosphor-gpio-monitor"
+SRCREV = "77ec47996d0c8b78d0f08d17fed8ff03107a1e03"
+S = "${WORKDIR}/git"
diff --git a/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-monitor@.service b/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-monitor@.service
new file mode 100644
index 000000000..37d127963
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-monitor@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Phosphor GPIO %I monitor
+
+[Service]
+Restart=no
+Type=oneshot
+EnvironmentFile={envfiledir}/obmc/gpio/%I
+ExecStart={sbindir}/phosphor-gpio-monitor --path=${{PATH}} --key=${{KEY}} --polarity=${{POLARITY}} --target=${{TARGET}}
diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
index 3dc3d3ce6..870407535 100644
--- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
@@ -190,5 +190,12 @@ PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config ?= \
PREFERRED_PROVIDER_virtual/phosphor-ipmi-inventory-sel ?= \
"${@cf_enabled(d, 'obmc-mrw', 'phosphor-ipmi-inventory-sel-mrw-native', 'phosphor-ipmi-inventory-sel-native')}"
+# The phosphor-gpio-monitor application is data-driven and requires an input.
+# The application then watches the passed in input event entry for the
+# change in polarity for the value matching user input. Once the required
+# condition is met, it calls into a systemd target file if one is mentioned
+# in input.
+PREFERRED_PROVIDER_virtual/obmc-gpio-monitor ?= "phosphor-gpio-monitor"
+
OBMC_DBUS_PATH_ROOT ?= "/xyz/openbmc_project"
OBMC_DBUS_IFACE_ROOT ?= "xyz.openbmc_project"
OpenPOWER on IntegriCloud