Matt Spinler | 9e9f599 | 2020-09-30 08:29:24 -0500 | [diff] [blame] | 1 | [ |
Matthew Barth | 8bd6308 | 2021-02-15 16:13:43 -0600 | [diff] [blame] | 2 | { |
| 3 | "comments": [ |
| 4 | "Example fan with tach feedback detection method. Fans without any", |
| 5 | "special presence detection hardware can use one or more tach speed", |
| 6 | "sensor feedbacks as an indicator of presence. Listed sensors are", |
| 7 | "expected to be found in the /xyz/openbmc_project/sensors/fan_tach", |
| 8 | "namespace as required by the OpenBMC DBus API. Supported policy types", |
| 9 | "are fallback or anyof. The fan_missing_error_time value is the amount", |
| 10 | "of time in seconds that a fan must be missing before an event log is", |
| 11 | "created." |
| 12 | ], |
| 13 | "name": "Example Fan0", |
| 14 | "path": "/system/chassis/motherboard/fan0", |
| 15 | "fan_missing_error_time": 10, |
| 16 | "methods": [ |
| 17 | { |
| 18 | "type": "tach", |
| 19 | "sensors": [ |
| 20 | "fan0" |
Matt Spinler | 9e9f599 | 2020-09-30 08:29:24 -0500 | [diff] [blame] | 21 | ] |
Matthew Barth | 8bd6308 | 2021-02-15 16:13:43 -0600 | [diff] [blame] | 22 | } |
| 23 | ] |
| 24 | }, |
| 25 | { |
| 26 | "comments": [ |
| 27 | "Example fan with gpio detection method. Fans with dedicated gpios can", |
| 28 | "use the gpio detection method. The gpio detection uses Linux gpio-keys,", |
| 29 | "where the event number is provided via the `key` property." |
| 30 | ], |
| 31 | "name": "Example Fan1", |
| 32 | "path": "/system/chassis/motherboard/fan1", |
| 33 | "fan_missing_error_time": 10, |
| 34 | "methods": [ |
| 35 | { |
| 36 | "type": "gpio", |
| 37 | "key": 123, |
| 38 | "physpath": "/sys/devices/foo/bar", |
| 39 | "devpath": "/dev/input/by-path/platform-gpio-keys-event" |
| 40 | } |
| 41 | ] |
| 42 | }, |
| 43 | { |
| 44 | "comments": [ |
| 45 | "Example fan with fallback redundancy policy. Multiple detection methods", |
| 46 | "for a single fan are allowed. When multiple detection methods are", |
| 47 | "provided a redundancy algorithm must be specified with the rpolicy", |
| 48 | "attribute. Note that the redundancy policy algorithm may or may not", |
| 49 | "factor the order the detection methods are listed into its logic. The", |
| 50 | "fallback algorithm falls back to subsequently listed detection methods", |
| 51 | "when the first method does not detect a fan and the second method does." |
| 52 | ], |
| 53 | "name": "Example Fan2", |
| 54 | "path": "/system/chassis/motherboard/fan2", |
| 55 | "fan_missing_error_time": 10, |
| 56 | "methods": [ |
| 57 | { |
| 58 | "type": "gpio", |
| 59 | "key": 124, |
| 60 | "physpath": "/sys/devices/foo/bar", |
| 61 | "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event" |
| 62 | }, |
| 63 | { |
| 64 | "type": "tach", |
| 65 | "sensors": [ |
| 66 | "fan2" |
Matt Spinler | 9e9f599 | 2020-09-30 08:29:24 -0500 | [diff] [blame] | 67 | ] |
Matthew Barth | 8bd6308 | 2021-02-15 16:13:43 -0600 | [diff] [blame] | 68 | } |
| 69 | ], |
| 70 | "rpolicy": { |
| 71 | "type": "fallback" |
Matt Spinler | e812239 | 2020-09-24 13:22:18 -0500 | [diff] [blame] | 72 | } |
Matthew Barth | 8bd6308 | 2021-02-15 16:13:43 -0600 | [diff] [blame] | 73 | }, |
| 74 | { |
| 75 | "comments": [ |
| 76 | "Example fan with anyof redundancy policy. The anyof algorithm reports", |
| 77 | "true if any redundancy set component sensors report true." |
| 78 | ], |
| 79 | "name": "Example Fan3", |
| 80 | "path": "/system/chassis/motherboard/fan3", |
| 81 | "fan_missing_error_time": 10, |
| 82 | "methods": [ |
| 83 | { |
| 84 | "type": "gpio", |
| 85 | "key": 125, |
| 86 | "physpath": "/sys/devices/foo/bar", |
| 87 | "devpath": "/dev/input/by-path/platform-gpio-keys-polled-event" |
| 88 | }, |
| 89 | { |
| 90 | "type": "tach", |
| 91 | "sensors": [ |
| 92 | "fan3" |
| 93 | ] |
| 94 | } |
| 95 | ], |
| 96 | "rpolicy": { |
| 97 | "type": "anyof" |
| 98 | } |
| 99 | } |
Matt Spinler | 9e9f599 | 2020-09-30 08:29:24 -0500 | [diff] [blame] | 100 | ] |