control:ibm,rainier-2u: Fan missing event
Sets/holds the fans at a target of 11200rpm when 1 or more fans are
missing.
Change-Id: I26c04b0e4b38ef3697de33fd5a2e4a89eb5fc3aa
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/config_files/p10bmc/ibm,rainier-2u/events.json b/control/config_files/p10bmc/ibm,rainier-2u/events.json
new file mode 100644
index 0000000..c3a6c5d
--- /dev/null
+++ b/control/config_files/p10bmc/ibm,rainier-2u/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": 11200
+ }
+ ]
+ }
+]
diff --git a/control/config_files/p10bmc/ibm,rainier-2u/groups.json b/control/config_files/p10bmc/ibm,rainier-2u/groups.json
new file mode 100644
index 0000000..02b2661
--- /dev/null
+++ b/control/config_files/p10bmc/ibm,rainier-2u/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"
+ ]
+ }
+]