control:ibm,rainier-4u: Fan missing event
Sets/holds the fans at a target of 10000rpm when 1 or more fans are
missing.
Change-Id: Idcfc868b4d64a6845c238879f6a3cdcba2dbe229
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/config_files/p10bmc/ibm,rainier-4u/events.json b/control/config_files/p10bmc/ibm,rainier-4u/events.json
new file mode 100644
index 0000000..bf267ad
--- /dev/null
+++ b/control/config_files/p10bmc/ibm,rainier-4u/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-4u/groups.json b/control/config_files/p10bmc/ibm,rainier-4u/groups.json
new file mode 100644
index 0000000..02b2661
--- /dev/null
+++ b/control/config_files/p10bmc/ibm,rainier-4u/groups.json
@@ -0,0 +1,13 @@
+[
+ {
+ "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/fan3",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/fan4",
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/fan5"
+ ]
+ }
+]