Revert "Revert "Add service to monitor the UCD90160 at runtime""

Putting back in the service to monitor the UCD90160 power
sequencer at runtime.  This was originally reverted because it
went in before the code to actually do the monitoring.

This reverts commit 0878ef76896ac06757363a8669e8f03a2f436019.

Resolves openbmc/openbmc#1724

Change-Id: I08fbaf59f54f7ac608ddde224b769054c979ecb4
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis-error-native.bb b/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis-error-native.bb
index 068d792..0ee635c 100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis-error-native.bb
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis-error-native.bb
@@ -15,4 +15,5 @@
     DEST=${yaml_dir}/xyz/openbmc_project/Power
     install -d ${DEST}
     install ${SRC}/Fault.errors.yaml ${DEST}
+    install ${SRC}/Fault.metadata.yaml ${DEST}
 }
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis.bb b/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis.bb
index 57ee0fe..f9b0e2a 100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis.bb
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis.bb
@@ -24,8 +24,11 @@
          "
 
 CHASSIS_ON_TGT = "obmc-chassis-poweron@0.target"
+SEQ_MONITOR_SVC = "witherspoon-pseq-monitor.service"
+SEQ_MONITOR_FMT = "../${SEQ_MONITOR_SVC}:${CHASSIS_ON_TGT}.wants/${SEQ_MONITOR_SVC}"
+
 SEQ_PGOOD_SVC = "witherspoon-pseq-monitor-pgood.service"
 SEQ_PGOOD_FMT = "../${SEQ_PGOOD_SVC}:${CHASSIS_ON_TGT}.wants/${SEQ_PGOOD_SVC}"
 
-SYSTEMD_SERVICE_${PN} += "${SEQ_PGOOD_SVC}"
-SYSTEMD_LINK_${PN} += "${SEQ_PGOOD_FMT}"
+SYSTEMD_SERVICE_${PN} += "${SEQ_MONITOR_SVC} ${SEQ_PGOOD_SVC}"
+SYSTEMD_LINK_${PN} += "${SEQ_MONITOR_FMT} ${SEQ_PGOOD_FMT}"
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-pseq-monitor.service b/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-pseq-monitor.service
new file mode 100644
index 0000000..d0ba9a9
--- /dev/null
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-pseq-monitor.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Witherspoon Power Sequencer Runtime Monitor
+Wants=obmc-host-start-pre@0.target
+Before=obmc-host-start-pre@0.target
+Wants=vcs_on@0.service
+After=vcs_on@0.service
+Conflicts=obmc-chassis-poweroff@0.target
+
+[Service]
+ExecStart=/usr/bin/env witherspoon-pseq-monitor -a runtime-monitor -i 1
+SyslogIdentifier=witherspoon-pseq-monitor