1# Phosphor Fan Presence (PFP) example configuration file. 2# 3# The configuration represents an array of fans the application 4# should check for presence. The name attribute is required 5# and is used as the PrettyName attribute for the 6# xyz.openbmc_project.Inventory.Item interface. Path is required 7# and is the location where the fan inventory object will be 8# created. Additional configuration directives described below 9# in the examples. 10 11- name: Example Fan0 12 description: > 13 'Example fan with tach feedback detection method. 14 15 Fans without any special presence detection hardware 16 can use one or more tach speed sensor feedbacks as 17 an indicator of presence. Listed sensors are expected to 18 be found in the /xyz/openbmc_project/sensors/fan_tach 19 namespace as required by the OpenBMC DBus API. 20 21 Supported policy types are fallback or anyof.' 22 path: /system/chassis/motherboard/fan0 23 methods: 24 - type: tach 25 sensors: 26 - fan0 27 28- name: Example Fan1 29 description: > 30 'Example fan with gpio detection method. 31 32 Fans with dedicated gpios can use the gpio detection 33 method. The gpio detection uses Linux gpio-keys: the 34 event number must be provided via the key property.' 35 path: /system/chassis/motherboard/fan1 36 methods: 37 - type: gpio 38 key: 123 39 physpath: /sys/devices/foo/bar 40 devpath: /dev/input/by-path/platform-gpio-keys-event 41 42- name: Example Fan2 43 description: > 44 'Example fan with fallback redundancy policy. 45 46 Multiple detection methods for a single fan are allowed. 47 When multiple detection methods are provided a redundancy 48 algorithm must be specified with the rpolicy attribute. 49 50 Note that the redundancy policy algorithm may or may not 51 factor the order the detection methods are listed into 52 its logic. 53 54 The fallback algorithm falls back to subsequently listed 55 detection methods when the first method does not detect 56 a fan and the second method does.' 57 path: /system/chassis/motherboard/fan2 58 methods: 59 - type: gpio 60 key: 124 61 physpath: /sys/devices/foo/bar 62 devpath: /dev/input/by-path/platform-gpio-keys-polled-event 63 - type: tach 64 sensors: 65 - fan2 66 rpolicy: 67 type: fallback 68 69- name: Example Fan3 70 description: > 71 'Example fan with anyof redundancy policy. 72 73 The anyof algorithm reports true if any redundancy set 74 component sensors report true.' 75 path: /system/chassis/motherboard/fan3 76 methods: 77 - type: gpio 78 key: 125 79 physpath: /sys/devices/foo/bar 80 devpath: /dev/input/by-path/platform-gpio-keys-polled-event 81 - type: tach 82 sensors: 83 - fan3 84 rpolicy: 85 type: anyof 86