xref: /openbmc/phosphor-fan-presence/presence/example/example.yaml (revision 5593560b1e1a7785a491d4650c4f3f61ffdaba90)
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 all_of or any_of.'
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
41- name: Example Fan2
42  description: >
43    'Example fan with fallback redundancy policy.
44
45    Multiple detection methods for a single fan are allowed.
46    When multiple detection methods are provided a redundancy
47    algorithm must be specified with the rpolicy attribute.
48
49    Note that the redundancy policy algorithm may or may not
50    factor the order the detection methods are listed into
51    its logic.
52
53    The fallback algorithm falls back to subsequently listed
54    detection methods when the first method does not detect
55    a fan and the second method does.'
56  path: /system/chassis/motherboard/fan2
57  methods:
58    - type: gpio
59      key: 124
60      physpath: /sys/devices/foo/bar
61    - type: tach
62      sensors:
63        - fan2
64  rpolicy:
65    type: fallback
66
67