summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/gpio
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2017-07-10 15:49:43 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-07-31 21:23:30 +0000
commitb163e9b2dc076a58c78782f990aef455cf22dee5 (patch)
treec779cdebef014df0bd8e70ca334de91c14fff3e6 /meta-phosphor/common/recipes-phosphor/gpio
parent57f1ad3c6c54a80576d18149c09a2a7e0cbae928 (diff)
downloadtalos-openbmc-b163e9b2dc076a58c78782f990aef455cf22dee5.tar.gz
talos-openbmc-b163e9b2dc076a58c78782f990aef455cf22dee5.zip
Add GPIO Presence
Add the GPIO Presence service file and needed Witherspoon conf files for power supply GPIO presence detection. Resolves openbmc/openbmc#1329 Change-Id: Ie8d5e3e6c2bda1c85fd10a4cffacfdd7ce9840ae Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/gpio')
-rw-r--r--meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor.bb38
-rw-r--r--meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service12
2 files changed, 45 insertions, 5 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
index 70f01dde0..6fc12ef91 100644
--- a/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor.bb
+++ b/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor.bb
@@ -8,19 +8,47 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
inherit autotools pkgconfig
inherit obmc-phosphor-dbus-service
-RPROVIDES_${PN} += "virtual/obmc-gpio-monitor"
+GPIO_PACKAGES = " \
+ ${PN}-monitor \
+ ${PN}-presence \
+"
+
+PACKAGES += "${GPIO_PACKAGES}"
+PACKAGES_remove = "${PN}"
+RDEPENDS_${PN}-dev = "${GPIO_PACKAGES}"
+RDEPENDS_${PN}-staticdev = "${GPIO_PACKAGES}"
+SYSTEMD_PACKAGES = "${GPIO_PACKAGES}"
+
+RPROVIDES_${PN}-monitor += "virtual/obmc-gpio-monitor"
+RPROVIDES_${PN}-presence += "virtual/obmc-gpio-presence"
+
PROVIDES += "virtual/obmc-gpio-monitor"
+PROVIDES += "virtual/obmc-gpio-presence"
DEPENDS += "autoconf-archive-native"
DEPENDS += "sdbusplus sdbusplus-native"
DEPENDS += "phosphor-dbus-interfaces"
DEPENDS += "libevdev"
DEPENDS += "phosphor-logging"
-RDEPENDS_${PN} += "libsystemd"
-RDEPENDS_${PN} += "libevdev"
-RDEPENDS_${PN} += "phosphor-logging"
-SYSTEMD_SERVICE_${PN} += "phosphor-gpio-monitor@.service"
+RDEPENDS_${PN}-monitor += " \
+ libsystemd \
+ libevdev \
+ phosphor-logging \
+"
+RDEPENDS_${PN}-presence += " \
+ libsystemd \
+ libevdev \
+ phosphor-logging \
+ sdbusplus \
+"
+
+SYSTEMD_SERVICE_${PN}-monitor += "phosphor-gpio-monitor@.service"
+SYSTEMD_SERVICE_${PN}-presence += "phosphor-gpio-presence@.service"
+
+FILES_${PN}-monitor += "${sbindir}/phosphor-gpio-monitor"
+FILES_${PN}-monitor += "${sbindir}/phosphor-gpio-util"
+FILES_${PN}-presence += "${sbindir}/phosphor-gpio-presence"
SRC_URI += "git://github.com/openbmc/phosphor-gpio-monitor"
SRCREV = "5d89f18a92ceeead129729811208ee13a9daf721"
diff --git a/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service b/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service
new file mode 100644
index 000000000..7872ce69f
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor GPIO %I Presence
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+ConditionPathExists={envfiledir}/obmc/gpio/phosphor-power-supply-%i.conf
+
+[Service]
+EnvironmentFile={envfiledir}/obmc/gpio/phosphor-power-supply-%i.conf
+ExecStart={sbindir}/phosphor-gpio-presence --path=${{PATH}} --inventory=${{INVENTORY}} --key=${{KEY}} --name=${{NAME}}
+
+[Install]
+RequiredBy={SYSTEMD_DEFAULT_TARGET}
OpenPOWER on IntegriCloud