witherspoon: Add fan speed inc/dec control based on reg temps

Created an event to increase or decrease fan speeds based on regulator
temperatures

Change-Id: If194953743756ae8de5949f1f4a6827d1796c46e
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-control-events-config-native/events.yaml b/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-control-events-config-native/events.yaml
index f4c6fa3..d87c197 100644
--- a/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-control-events-config-native/events.yaml
+++ b/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-control-events-config-native/events.yaml
@@ -81,6 +81,12 @@
           - /temperature/p1_core21_temp
           - /temperature/p1_core22_temp
           - /temperature/p1_core23_temp
+    - name: zone0_regulators
+      description: Group of regulator temperature sensors for zone 0
+      type: /xyz/openbmc_project/sensors
+      members:
+          - /temperature/p0_vdd_temp
+          - /temperature/p1_vdd_temp
 
 preconditions:
     - name: property_states_match
@@ -327,3 +333,49 @@
               type: uint64_t
       timer:
           interval: 15
+    - name: speed_increase_changes_based_on_regulator_temps
+      zone_conditions:
+          - name: air_cooled_chassis
+            zones:
+                - 0
+          - name: water_and_air_cooled_chassis
+            zones:
+                - 0
+      group: zone0_regulators
+      interface: xyz.openbmc_project.Sensor.Value
+      property:
+          name: Value
+          type: int64_t
+      action:
+          name: set_net_increase_speed
+          property: 85000
+          factor:
+              value: 1000
+              type: int64_t
+          delta:
+              value: 400
+              type: uint64_t
+    - name: speed_decrease_changes_based_on_regulator_temps
+      zone_conditions:
+          - name: air_cooled_chassis
+            zones:
+                - 0
+          - name: water_and_air_cooled_chassis
+            zones:
+                - 0
+      group: zone0_regulators
+      interface: xyz.openbmc_project.Sensor.Value
+      property:
+          name: Value
+          type: int64_t
+      action:
+          name: set_net_decrease_speed
+          property: 82000
+          factor:
+              value: 1000
+              type: int64_t
+          delta:
+              value: 10
+              type: uint64_t
+      timer:
+          interval: 15