control:ibm,rainier-1s4u: Fan missing event
Sets/holds the fans at a target of 10000rpm when 1 or more fans are
missing.
Change-Id: I93a222c125d3c47af7fe3954da748f663e0a9f0f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/config_files/p10bmc/ibm,rainier-1s4u/events.json b/control/config_files/p10bmc/ibm,rainier-1s4u/events.json
new file mode 100644
index 0000000..bf267ad
--- /dev/null
+++ b/control/config_files/p10bmc/ibm,rainier-1s4u/events.json
@@ -0,0 +1,31 @@
+[
+ {
+ // Hold fans at the given target when a number of fans are missing.
+ "name": "fan(s) missing",
+ "groups": [
+ {
+ "name": "fan inventory",
+ "interface": "xyz.openbmc_project.Inventory.Item",
+ "property": { "name": "Present" }
+ }
+ ],
+ "triggers": [
+ {
+ "class": "init",
+ "method": "get_properties"
+ },
+ {
+ "class": "signal",
+ "signal": "properties_changed"
+ }
+ ],
+ "actions": [
+ {
+ "name": "count_state_before_target",
+ "count": 1,
+ "state": false,
+ "target": 10000
+ }
+ ]
+ }
+]
diff --git a/control/config_files/p10bmc/ibm,rainier-1s4u/groups.json b/control/config_files/p10bmc/ibm,rainier-1s4u/groups.json
new file mode 100644
index 0000000..e829607
--- /dev/null
+++ b/control/config_files/p10bmc/ibm,rainier-1s4u/groups.json
@@ -0,0 +1,11 @@
+[
+ {
+ "name": "fan inventory",
+ "members": [
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/fan0",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/fan1",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/fan2",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/fan4"
+ ]
+ }
+]