summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2018-04-25 11:20:32 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-05-02 16:56:54 +0000
commita521e1375300f9d71b6d4e3e2bdbcdf014baaeaa (patch)
tree5ad6bbd2a1c78edd1011c7b2b6fbdd72de316709 /meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor
parent245cb96f91b58bb08fca020dede2313feafae58a (diff)
downloadtalos-openbmc-a521e1375300f9d71b6d4e3e2bdbcdf014baaeaa.tar.gz
talos-openbmc-a521e1375300f9d71b6d4e3e2bdbcdf014baaeaa.zip
wspoon: Add service to help start MAX31785 hwmon
This service will be started in the udev rule for the MAX31785 hotplug add event. It will wait for the phosphor-cooling-type service to be done, and then run the script to start the phosphor-hwmon instance for the MAX31785 fan controller after it chooses the correct config file to use. Tested: Test that this service correctly runs the script and that phosphor-hwmon does get started. Change-Id: I4495f7073d63004d4dd8333df8964d69beaae4ea Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor')
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%.bbappend2
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/max31785-hwmon-helper@.service9
2 files changed, 11 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
index 16c8d618b..7a83bf054 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
@@ -33,6 +33,8 @@ SYSTEMD_ENVIRONMENT_FILE_${PN} += "${@compose_list(d, 'ENVS', 'WSPOON_OCCITEMS')
SYSTEMD_ENVIRONMENT_FILE_max31785-msl += "obmc/hwmon-max31785/wspoon.conf"
SYSTEMD_LINK_max31785-msl += "../phosphor-max31785-msl@.service:${SYSTEMD_DEFAULT_TARGET}.wants/phosphor-max31785-msl@wspoon.service"
+SYSTEMD_SERVICE_${PN} += "max31785-hwmon-helper@.service"
+
do_install_append() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/start_max31785_hwmon.sh ${D}${bindir}
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/max31785-hwmon-helper@.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/max31785-hwmon-helper@.service
new file mode 100644
index 000000000..98b5541f2
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/max31785-hwmon-helper@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=MAX31785 hwmon helper
+Wants=phosphor-cooling-type@0.service
+After=phosphor-cooling-type@0.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/env start_max31785_hwmon.sh %I
+SyslogIdentifier=max31785-hwmon-helper
OpenPOWER on IntegriCloud