From 0bccf766b125fe06beba3c8697b05cfac41f53b3 Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Wed, 25 Apr 2018 11:26:08 -0500 Subject: wspoon: Start hwmon differently for the MAX31785 Add a new udev rule to start the phosphor-hwmon instance for the MAX31785 fan controller differently than other hwmon devices. Also introduce different hwmon config files for air and water cooled systems where the water cooled system doesn't use fan 1. The new udev rule starts a service that will check the cooling type and then link in the appropriate config file before starting the actual phosphor-hwmon service. Note that this phosphor-hwmon service is still stopped the same as any other phosphor-hwmon service. Tested: Test that phosphor-hwmon is started using the correct config files on air and water cooled systems. Change-Id: Ia93d97df024e7b6bff5eb379ddea4730fe34b55b Signed-off-by: Matt Spinler --- .../recipes-phosphor/sensors/phosphor-hwmon%/70-hwmon.rules | 2 ++ .../sensors/phosphor-hwmon%/70-max31785-hwmon.rules | 1 + .../obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52.conf | 9 --------- .../hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_air.conf | 9 +++++++++ .../ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_water.conf | 7 +++++++ 5 files changed, 19 insertions(+), 9 deletions(-) create mode 100755 meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/70-hwmon.rules create mode 100755 meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/70-max31785-hwmon.rules delete mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52.conf create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_air.conf create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_water.conf (limited to 'meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%') diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/70-hwmon.rules b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/70-hwmon.rules new file mode 100755 index 000000000..548b219e7 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/70-hwmon.rules @@ -0,0 +1,2 @@ +SUBSYSTEM=="hwmon", ACTION=="add", ENV{OF_NAME}!="max31785", RUN="/usr/bin/start_hwmon.sh start %p %E{OF_FULLNAME}" +SUBSYSTEM=="hwmon", ACTION=="remove", RUN="/usr/bin/start_hwmon.sh stop %p %E{OF_FULLNAME}" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/70-max31785-hwmon.rules b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/70-max31785-hwmon.rules new file mode 100755 index 000000000..e1c3172f4 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/70-max31785-hwmon.rules @@ -0,0 +1 @@ +SUBSYSTEM=="hwmon", ACTION=="add", ENV{OF_NAME}=="max31785", RUN="/bin/systemctl start max31785-hwmon-helper@%E{OF_FULLNAME}.service" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52.conf deleted file mode 100644 index 0417ea876..000000000 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52.conf +++ /dev/null @@ -1,9 +0,0 @@ -LABEL_fan1 = "fan0_0" -LABEL_fan2 = "fan1_0" -LABEL_fan3 = "fan2_0" -LABEL_fan4 = "fan3_0" -LABEL_fan5 = "fan0_1" -LABEL_fan6 = "fan1_1" -LABEL_fan7 = "fan2_1" -LABEL_fan8 = "fan3_1" -TARGET_MODE = "RPM" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_air.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_air.conf new file mode 100644 index 000000000..0417ea876 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_air.conf @@ -0,0 +1,9 @@ +LABEL_fan1 = "fan0_0" +LABEL_fan2 = "fan1_0" +LABEL_fan3 = "fan2_0" +LABEL_fan4 = "fan3_0" +LABEL_fan5 = "fan0_1" +LABEL_fan6 = "fan1_1" +LABEL_fan7 = "fan2_1" +LABEL_fan8 = "fan3_1" +TARGET_MODE = "RPM" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_water.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_water.conf new file mode 100644 index 000000000..271e6be22 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@100/max31785@52_water.conf @@ -0,0 +1,7 @@ +LABEL_fan1 = "fan0_0" +LABEL_fan3 = "fan2_0" +LABEL_fan4 = "fan3_0" +LABEL_fan5 = "fan0_1" +LABEL_fan7 = "fan2_1" +LABEL_fan8 = "fan3_1" +TARGET_MODE = "RPM" -- cgit v1.2.1