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 can use one or more
16      tach speed sensor feedbacks as an indicator of presence.  Listed sensors
17      are expected to be found in the /xyz/openbmc_project/sensors/fan_tach
18      namespace as required by the OpenBMC DBus API.
19
20      Supported policy types are fallback or anyof.'
21  path: /system/chassis/motherboard/fan0
22  methods:
23      - type: tach
24        sensors:
25            - fan0
26
27- name: Example Fan1
28  description: >
29      'Example fan with gpio detection method.
30
31      Fans with dedicated gpios can use the gpio detection method.  The gpio
32      detection uses Linux gpio-keys: the event number must be provided via the
33      key property.'
34  path: /system/chassis/motherboard/fan1
35  methods:
36      - type: gpio
37        key: 123
38        physpath: /sys/devices/foo/bar
39        devpath: /dev/input/by-path/platform-gpio-keys-event
40
41- name: Example Fan2
42  description: >
43      'Example fan with fallback redundancy policy.
44
45      Multiple detection methods for a single fan are allowed. When multiple
46      detection methods are provided a redundancy algorithm must be specified
47      with the rpolicy attribute.
48
49      Note that the redundancy policy algorithm may or may not factor the order
50      the detection methods are listed into its logic.
51
52      The fallback algorithm falls back to subsequently listed detection methods
53      when the first method does not detect a fan and the second method does.'
54  path: /system/chassis/motherboard/fan2
55  methods:
56      - type: gpio
57        key: 124
58        physpath: /sys/devices/foo/bar
59        devpath: /dev/input/by-path/platform-gpio-keys-polled-event
60      - type: tach
61        sensors:
62            - fan2
63  rpolicy:
64      type: fallback
65
66- name: Example Fan3
67  description: >
68      'Example fan with anyof redundancy policy.
69
70      The anyof algorithm reports true if any redundancy set component sensors
71      report true.'
72  path: /system/chassis/motherboard/fan3
73  methods:
74      - type: gpio
75        key: 125
76        physpath: /sys/devices/foo/bar
77        devpath: /dev/input/by-path/platform-gpio-keys-polled-event
78      - type: tach
79        sensors:
80            - fan3
81  rpolicy:
82      type: anyof
83