10b49fe78SMatthew Barth[
20b49fe78SMatthew Barth    {
38bd63087SMatthew Barth        "comments": [
48bd63087SMatthew Barth            "Example fan with tach feedback detection method. Fans without any",
58bd63087SMatthew Barth            "special presence detection hardware can use one or more tach speed",
68bd63087SMatthew Barth            "sensor feedbacks as an indicator of presence. Listed sensors are",
78bd63087SMatthew Barth            "expected to be found in the /xyz/openbmc_project/sensors/fan_tach",
88bd63087SMatthew Barth            "namespace as required by the OpenBMC DBus API. Supported policy types",
98bd63087SMatthew Barth            "are fallback or anyof. The fan_missing_error_time value is the amount",
108bd63087SMatthew Barth            "of time in seconds that a fan must be missing before an event log is",
118bd63087SMatthew Barth            "created."
128bd63087SMatthew 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",
19*a49e3f19SPatrick Williams                "sensors": ["fan0"]
200b49fe78SMatthew Barth            }
210b49fe78SMatthew Barth        ]
220b49fe78SMatthew Barth    },
230b49fe78SMatthew Barth    {
248bd63087SMatthew Barth        "comments": [
258bd63087SMatthew Barth            "Example fan with gpio detection method. Fans with dedicated gpios can",
268bd63087SMatthew Barth            "use the gpio detection method. The gpio detection uses Linux gpio-keys,",
278bd63087SMatthew Barth            "where the event number is provided via the `key` property."
288bd63087SMatthew Barth        ],
290b49fe78SMatthew Barth        "name": "Example Fan1",
300b49fe78SMatthew Barth        "path": "/system/chassis/motherboard/fan1",
310b49fe78SMatthew Barth        "fan_missing_error_time": 10,
320b49fe78SMatthew Barth        "methods": [
330b49fe78SMatthew Barth            {
340b49fe78SMatthew Barth                "type": "gpio",
350b49fe78SMatthew Barth                "key": 123,
360b49fe78SMatthew Barth                "physpath": "/sys/devices/foo/bar",
370b49fe78SMatthew Barth                "devpath": "/dev/input/by-path/platform-gpio-keys-event"
380b49fe78SMatthew Barth            }
390b49fe78SMatthew Barth        ]
400b49fe78SMatthew Barth    },
410b49fe78SMatthew Barth    {
428bd63087SMatthew Barth        "comments": [
438bd63087SMatthew Barth            "Example fan with fallback redundancy policy. Multiple detection methods",
448bd63087SMatthew Barth            "for a single fan are allowed. When multiple detection methods are",
458bd63087SMatthew Barth            "provided a redundancy algorithm must be specified with the rpolicy",
468bd63087SMatthew Barth            "attribute. Note that the redundancy policy algorithm may or may not",
478bd63087SMatthew Barth            "factor the order the detection methods are listed into its logic. The",
488bd63087SMatthew Barth            "fallback algorithm falls back to subsequently listed detection methods",
498bd63087SMatthew Barth            "when the first method does not detect a fan and the second method does."
508bd63087SMatthew Barth        ],
510b49fe78SMatthew Barth        "name": "Example Fan2",
520b49fe78SMatthew Barth        "path": "/system/chassis/motherboard/fan2",
530b49fe78SMatthew Barth        "fan_missing_error_time": 10,
540b49fe78SMatthew Barth        "methods": [
550b49fe78SMatthew Barth            {
560b49fe78SMatthew Barth                "type": "gpio",
570b49fe78SMatthew Barth                "key": 124,
580b49fe78SMatthew Barth                "physpath": "/sys/devices/foo/bar",
590b49fe78SMatthew Barth                "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
600b49fe78SMatthew Barth            },
610b49fe78SMatthew Barth            {
620b49fe78SMatthew Barth                "type": "tach",
63*a49e3f19SPatrick Williams                "sensors": ["fan2"]
640b49fe78SMatthew Barth            }
650b49fe78SMatthew Barth        ],
660b49fe78SMatthew Barth        "rpolicy": {
670b49fe78SMatthew Barth            "type": "fallback"
680b49fe78SMatthew Barth        }
690b49fe78SMatthew Barth    },
700b49fe78SMatthew Barth    {
718bd63087SMatthew Barth        "comments": [
728bd63087SMatthew Barth            "Example fan with anyof redundancy policy. The anyof algorithm reports",
738bd63087SMatthew Barth            "true if any redundancy set component sensors report true."
748bd63087SMatthew Barth        ],
750b49fe78SMatthew Barth        "name": "Example Fan3",
760b49fe78SMatthew Barth        "path": "/system/chassis/motherboard/fan3",
770b49fe78SMatthew Barth        "fan_missing_error_time": 10,
780b49fe78SMatthew Barth        "methods": [
790b49fe78SMatthew Barth            {
800b49fe78SMatthew Barth                "type": "gpio",
810b49fe78SMatthew Barth                "key": 125,
820b49fe78SMatthew Barth                "physpath": "/sys/devices/foo/bar",
830b49fe78SMatthew Barth                "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event"
840b49fe78SMatthew Barth            },
850b49fe78SMatthew Barth            {
860b49fe78SMatthew Barth                "type": "tach",
87*a49e3f19SPatrick Williams                "sensors": ["fan3"]
880b49fe78SMatthew Barth            }
890b49fe78SMatthew Barth        ],
900b49fe78SMatthew Barth        "rpolicy": {
910b49fe78SMatthew Barth            "type": "anyof"
920b49fe78SMatthew Barth        }
930b49fe78SMatthew Barth    }
940b49fe78SMatthew Barth]
95