Power supply monitor recipe, service, and conf

Add the Witherspoon power supply monitor application, service file, and
configuration files to the witherspoon-pfault-analysis recipe.

Moved OBMC_POWER_SUPPLY_INSTANCES to the global metadata so it can be
shared between recipes.

Resolves: openbmc/openbmc#1731

Depends-On: Ie364a3dc5b7f19cbc587450fc54f231d1ec280f7

Change-Id: I340a1d48a979a97624843e59a5ab1b1ad04056bb
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-power-supply-monitor@.service b/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-power-supply-monitor@.service
new file mode 100644
index 0000000..e2b6b27
--- /dev/null
+++ b/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-power-supply-monitor@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Witherspoon Power Supply %I Monitor
+Wants=mapper-wait@-xyz-openbmc_project-inventory-system-chassis-power_supply%i.service
+After=mapper-wait@-xyz-openbmc_project-inventory-system-chassis-power_supply%i.service
+Wants=mapper-wait@-org-openbmc-control-power0.service
+After=mapper-wait@-org-openbmc-control-power0.service
+ConditionPathExists={envfiledir}/obmc/power-supply-monitor/power-supply-monitor-%i.conf
+
+[Service]
+EnvironmentFile={envfiledir}/obmc/power-supply-monitor/power-supply-monitor-%i.conf
+ExecStart=/usr/bin/env witherspoon-psu-monitor --path=${{DEVPATH}} --instance=${{INSTANCE}} --inventory=${{INVENTORY}}
+SysLogIdentifier=witherspoon-psu-monitor
+
+[Install]
+RequiredBy={SYSTEMD_DEFAULT_TARGET}