diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2017-07-10 23:49:43 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-08-01 00:23:30 +0300 |
commit | b163e9b2dc076a58c78782f990aef455cf22dee5 (patch) | |
tree | c779cdebef014df0bd8e70ca334de91c14fff3e6 /meta-phosphor/common/recipes-phosphor/gpio | |
parent | 57f1ad3c6c54a80576d18149c09a2a7e0cbae928 (diff) | |
download | openbmc-b163e9b2dc076a58c78782f990aef455cf22dee5.tar.xz |
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.bb | 38 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service | 12 |
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} |