fans:rainier: Add fan presence config files

This commit adds the fan presence config files for the rainier type
machines. The recipe updates to install these files into a rainier image
will collectively be done after all fan application config files are
added.

(From meta-ibm rev: f131f38e89da79848595670af0d150e01aaa664a)

Change-Id: I514589fcde2a7d500e272b7d45ac90961bb46368
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/rainier/everest/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/rainier/everest/config.json
new file mode 100644
index 0000000..dcadd10
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/rainier/everest/config.json
@@ -0,0 +1,90 @@
+[
+   {
+      "name": "fan0",
+      "path": "/system/chassis/motherboard/fan0",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 19,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a780.i2c-bus/i2c-14/14-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan0_0",
+               "fan0_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan1",
+      "path": "/system/chassis/motherboard/fan1",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 18,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a780.i2c-bus/i2c-14/14-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan1_0",
+               "fan1_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan2",
+      "path": "/system/chassis/motherboard/fan2",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 17,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a780.i2c-bus/i2c-14/14-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan2_0",
+               "fan2_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan3",
+      "path": "/system/chassis/motherboard/fan3",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 16,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a780.i2c-bus/i2c-14/14-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan3_0",
+               "fan3_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   }
+]
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/rainier/rainier-2u/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/rainier/rainier-2u/config.json
new file mode 100644
index 0000000..7264510
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/rainier/rainier-2u/config.json
@@ -0,0 +1,134 @@
+[
+   {
+      "name": "fan0",
+      "path": "/system/chassis/motherboard/fan0",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 6,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan0_0",
+               "fan0_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan1",
+      "path": "/system/chassis/motherboard/fan1",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 7,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan1_0",
+               "fan1_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan2",
+      "path": "/system/chassis/motherboard/fan2",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 8,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan2_0",
+               "fan2_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan3",
+      "path": "/system/chassis/motherboard/fan3",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 9,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan3_0",
+               "fan3_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan4",
+      "path": "/system/chassis/motherboard/fan4",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 10,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan4_0",
+               "fan4_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan5",
+      "path": "/system/chassis/motherboard/fan5",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 11,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan5_0",
+               "fan5_1"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   }
+]
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/rainier/rainier-4u/config.json b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/rainier/rainier-4u/config.json
new file mode 100644
index 0000000..94e7e69
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan-presence-config/rainier/rainier-4u/config.json
@@ -0,0 +1,128 @@
+[
+   {
+      "name": "fan0",
+      "path": "/system/chassis/motherboard/fan0",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 6,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan0_0"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan1",
+      "path": "/system/chassis/motherboard/fan1",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 7,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan1_0"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan2",
+      "path": "/system/chassis/motherboard/fan2",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 8,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan2_0"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan3",
+      "path": "/system/chassis/motherboard/fan3",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 9,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan3_0"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan4",
+      "path": "/system/chassis/motherboard/fan4",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 10,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan4_0"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   },
+   {
+      "name": "fan5",
+      "path": "/system/chassis/motherboard/fan5",
+      "methods": [
+         {
+            "type": "gpio",
+            "key": 11,
+            "physpath": "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0061",
+            "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
+         },
+         {
+            "type": "tach",
+            "sensors": [
+               "fan5_0"
+            ]
+         }
+      ],
+      "rpolicy": {
+         "type": "anyof"
+      }
+   }
+]