From a521e1375300f9d71b6d4e3e2bdbcdf014baaeaa Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Wed, 25 Apr 2018 11:20:32 -0500 Subject: 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 --- .../recipes-phosphor/sensors/phosphor-hwmon%.bbappend | 2 ++ .../sensors/phosphor-hwmon%/max31785-hwmon-helper@.service | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/max31785-hwmon-helper@.service (limited to 'meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor') 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 -- cgit v1.2.1