10b49fe78SMatthew Barth[
20b49fe78SMatthew Barth  {
3*8bd63087SMatthew Barth    "comments": [
4*8bd63087SMatthew Barth      "Example fan with tach feedback detection method. Fans without any",
5*8bd63087SMatthew Barth      "special presence detection hardware can use one or more tach speed",
6*8bd63087SMatthew Barth      "sensor feedbacks as an indicator of presence. Listed sensors are",
7*8bd63087SMatthew Barth      "expected to be found in the /xyz/openbmc_project/sensors/fan_tach",
8*8bd63087SMatthew Barth      "namespace as required by the OpenBMC DBus API. Supported policy types",
9*8bd63087SMatthew Barth      "are fallback or anyof. The fan_missing_error_time value is the amount",
10*8bd63087SMatthew Barth      "of time in seconds that a fan must be missing before an event log is",
11*8bd63087SMatthew Barth      "created."
12*8bd63087SMatthew Barth    ],
130b49fe78SMatthew Barth    "name": "Example Fan0",
140b49fe78SMatthew Barth    "path": "/system/chassis/motherboard/fan0",
150b49fe78SMatthew Barth    "fan_missing_error_time": 10,
160b49fe78SMatthew Barth    "methods": [
170b49fe78SMatthew Barth      {
180b49fe78SMatthew Barth        "type": "tach",
190b49fe78SMatthew Barth        "sensors": [
200b49fe78SMatthew Barth          "fan0"
210b49fe78SMatthew Barth        ]
220b49fe78SMatthew Barth      }
230b49fe78SMatthew Barth    ]
240b49fe78SMatthew Barth  },
250b49fe78SMatthew Barth  {
26*8bd63087SMatthew Barth    "comments": [
27*8bd63087SMatthew Barth      "Example fan with gpio detection method. Fans with dedicated gpios can",
28*8bd63087SMatthew Barth      "use the gpio detection method. The gpio detection uses Linux gpio-keys,",
29*8bd63087SMatthew Barth      "where the event number is provided via the `key` property."
30*8bd63087SMatthew Barth    ],
310b49fe78SMatthew Barth    "name": "Example Fan1",
320b49fe78SMatthew Barth    "path": "/system/chassis/motherboard/fan1",
330b49fe78SMatthew Barth    "fan_missing_error_time": 10,
340b49fe78SMatthew Barth    "methods": [
350b49fe78SMatthew Barth      {
360b49fe78SMatthew Barth        "type": "gpio",
370b49fe78SMatthew Barth        "key": 123,
380b49fe78SMatthew Barth        "physpath": "/sys/devices/foo/bar",
390b49fe78SMatthew Barth        "devpath": "/dev/input/by-path/platform-gpio-keys-event"
400b49fe78SMatthew Barth      }
410b49fe78SMatthew Barth    ]
420b49fe78SMatthew Barth  },
430b49fe78SMatthew Barth  {
44*8bd63087SMatthew Barth    "comments": [
45*8bd63087SMatthew Barth      "Example fan with fallback redundancy policy. Multiple detection methods",
46*8bd63087SMatthew Barth      "for a single fan are allowed. When multiple detection methods are",
47*8bd63087SMatthew Barth      "provided a redundancy algorithm must be specified with the rpolicy",
48*8bd63087SMatthew Barth      "attribute. Note that the redundancy policy algorithm may or may not",
49*8bd63087SMatthew Barth      "factor the order the detection methods are listed into its logic. The",
50*8bd63087SMatthew Barth      "fallback algorithm falls back to subsequently listed detection methods",
51*8bd63087SMatthew Barth      "when the first method does not detect a fan and the second method does."
52*8bd63087SMatthew Barth    ],
530b49fe78SMatthew Barth    "name": "Example Fan2",
540b49fe78SMatthew Barth    "path": "/system/chassis/motherboard/fan2",
550b49fe78SMatthew Barth    "fan_missing_error_time": 10,
560b49fe78SMatthew Barth    "methods": [
570b49fe78SMatthew Barth      {
580b49fe78SMatthew Barth        "type": "gpio",
590b49fe78SMatthew Barth        "key": 124,
600b49fe78SMatthew Barth        "physpath": "/sys/devices/foo/bar",
610b49fe78SMatthew Barth        "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
620b49fe78SMatthew Barth      },
630b49fe78SMatthew Barth      {
640b49fe78SMatthew Barth        "type": "tach",
650b49fe78SMatthew Barth        "sensors": [
660b49fe78SMatthew Barth          "fan2"
670b49fe78SMatthew Barth        ]
680b49fe78SMatthew Barth      }
690b49fe78SMatthew Barth    ],
700b49fe78SMatthew Barth    "rpolicy": {
710b49fe78SMatthew Barth      "type": "fallback"
720b49fe78SMatthew Barth    }
730b49fe78SMatthew Barth  },
740b49fe78SMatthew Barth  {
75*8bd63087SMatthew Barth    "comments": [
76*8bd63087SMatthew Barth      "Example fan with anyof redundancy policy. The anyof algorithm reports",
77*8bd63087SMatthew Barth      "true if any redundancy set component sensors report true."
78*8bd63087SMatthew Barth    ],
790b49fe78SMatthew Barth    "name": "Example Fan3",
800b49fe78SMatthew Barth    "path": "/system/chassis/motherboard/fan3",
810b49fe78SMatthew Barth    "fan_missing_error_time": 10,
820b49fe78SMatthew Barth    "methods": [
830b49fe78SMatthew Barth      {
840b49fe78SMatthew Barth        "type": "gpio",
850b49fe78SMatthew Barth        "key": 125,
860b49fe78SMatthew Barth        "physpath": "/sys/devices/foo/bar",
870b49fe78SMatthew Barth        "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
880b49fe78SMatthew Barth      },
890b49fe78SMatthew Barth      {
900b49fe78SMatthew Barth        "type": "tach",
910b49fe78SMatthew Barth        "sensors": [
920b49fe78SMatthew Barth          "fan3"
930b49fe78SMatthew Barth        ]
940b49fe78SMatthew Barth      }
950b49fe78SMatthew Barth    ],
960b49fe78SMatthew Barth    "rpolicy": {
970b49fe78SMatthew Barth      "type": "anyof"
980b49fe78SMatthew Barth    }
990b49fe78SMatthew Barth  }
1000b49fe78SMatthew Barth]
101