1s4u: fan-monitor support for new system

The 1s4u is just like the 2s4u except it has two less fans. Thermal
profiling may change some of the variable but for now just use the same
as the 2s4u.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Iab3fd9d1699de779c242bb42456d976697b4da14
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config.bbappend b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config.bbappend
index dfe2209..8b63927 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config.bbappend
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config.bbappend
@@ -3,6 +3,7 @@
 SRC_URI_witherspoon = "file://config.json"
 SRC_URI_rainier = "file://rainier-2u/config.json \
                    file://rainier-4u/config.json \
+                   file://rainier-1s4u/config.json \
                    file://everest/config.json \
                    "
 
@@ -15,8 +16,10 @@
         # Install Rainier-2U/4U fan monitor config files
         install -d ${D}/${datadir}/phosphor-fan-presence/monitor/ibm,rainier-2u/
         install -d ${D}/${datadir}/phosphor-fan-presence/monitor/ibm,rainier-4u/
+        install -d ${D}/${datadir}/phosphor-fan-presence/monitor/ibm,rainier-1s4u/
         install -m 0644 ${WORKDIR}/rainier-2u/config.json ${D}/${datadir}/phosphor-fan-presence/monitor/ibm,rainier-2u/
         install -m 0644 ${WORKDIR}/rainier-4u/config.json ${D}/${datadir}/phosphor-fan-presence/monitor/ibm,rainier-4u/
+        install -m 0644 ${WORKDIR}/rainier-1s4u/config.json ${D}/${datadir}/phosphor-fan-presence/monitor/ibm,rainier-1s4u/
 
         # Install Everest fan monitor config file
         install -d ${D}/${datadir}/phosphor-fan-presence/monitor/ibm,everest/
@@ -29,4 +32,5 @@
 FILES_${PN}_remove_rainier = "${monitor_datadir}/monitor.yaml"
 FILES_${PN}_append_rainier = " ${datadir}/phosphor-fan-presence/monitor/ibm,rainier-2u/config.json"
 FILES_${PN}_append_rainier = " ${datadir}/phosphor-fan-presence/monitor/ibm,rainier-4u/config.json"
+FILES_${PN}_append_rainier = " ${datadir}/phosphor-fan-presence/monitor/ibm,rainier-1s4u/config.json"
 FILES_${PN}_append_rainier = " ${datadir}/phosphor-fan-presence/monitor/ibm,everest/config.json"
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/rainier/rainier-1s4u/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/rainier/rainier-1s4u/config.json
new file mode 100644
index 0000000..1a5e305
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-monitor-config/rainier/rainier-1s4u/config.json
@@ -0,0 +1,90 @@
+{
+   "fans": [
+      {
+         "inventory": "/system/chassis/motherboard/fan0",
+         "functional_delay": 5,
+         "allowed_out_of_range_time": 30,
+         "deviation": 15,
+         "num_sensors_nonfunc_for_fan_nonfunc": 1,
+         "monitor_start_delay": 30,
+         "fan_missing_error_delay": 20,
+         "nonfunc_rotor_error_delay": 0,
+         "sensors": [
+            {
+               "name": "fan0_0",
+               "has_target": true
+            }
+         ]
+      },
+      {
+         "inventory": "/system/chassis/motherboard/fan1",
+         "functional_delay": 5,
+         "allowed_out_of_range_time": 30,
+         "deviation": 15,
+         "num_sensors_nonfunc_for_fan_nonfunc": 1,
+         "monitor_start_delay": 30,
+         "fan_missing_error_delay": 20,
+         "nonfunc_rotor_error_delay": 0,
+         "sensors": [
+            {
+               "name": "fan1_0",
+               "has_target": true
+            }
+         ]
+      },
+      {
+         "inventory": "/system/chassis/motherboard/fan2",
+         "functional_delay": 5,
+         "allowed_out_of_range_time": 30,
+         "deviation": 15,
+         "num_sensors_nonfunc_for_fan_nonfunc": 1,
+         "monitor_start_delay": 30,
+         "fan_missing_error_delay": 20,
+         "nonfunc_rotor_error_delay": 0,
+         "sensors": [
+            {
+               "name": "fan2_0",
+               "has_target": true
+            }
+         ]
+      },
+      {
+         "inventory": "/system/chassis/motherboard/fan3",
+         "functional_delay": 5,
+         "allowed_out_of_range_time": 30,
+         "deviation": 15,
+         "num_sensors_nonfunc_for_fan_nonfunc": 1,
+         "monitor_start_delay": 30,
+         "fan_missing_error_delay": 20,
+         "nonfunc_rotor_error_delay": 0,
+         "sensors": [
+            {
+               "name": "fan3_0",
+               "has_target": true
+            }
+         ]
+      }
+   ],
+   "fault_handling":
+   {
+       "num_nonfunc_rotors_before_error": 1,
+
+       "power_off_config":
+       [
+           {
+                "type": "hard",
+                "cause": "missing_fan_frus",
+                "count": 1,
+                "delay": 25,
+                "state": "at_pgood"
+            },
+            {
+                "type": "epow",
+                "cause": "nonfunc_fan_rotors",
+                "count": 2,
+                "service_mode_delay": 300,
+                "meltdown_delay": 300
+            }
+       ]
+   }
+}