1# methods 2 3## Description 4 5An array of method objects used to detect the fan's present state. Each 6supported method requires its own set of attributes to be provided. 7 8## Attribute Value(s) 9 10Method `type`: 11 12- ["tach"](#tach) 13- ["gpio"](#gpio) 14 15### "tach" 16 17Requires an array of `sensors` of each fan tach D-Bus sensor name to be used to 18determine fan presence. This is the name of the fan tach sensor located under 19the `/xyz/openbmc_project/sensors/fan_tach/` D-Bus path. 20 21```text 22"type": "tach", 23"sensors": [ 24 "fan0_0" 25] 26``` 27 28### "gpio" 29 30Detects fans with dedicated GPIOs using Linux 31[gpio-keys](https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt) 32device tree bindings, where the event number is provided via the `key` 33attribute. 34 35```text 36"type": "gpio", 37"key": 1, 38"physpath": "/sys/bus/i2c/devices/1-0001", 39"devpath": "/dev/input/by-path/platform-gpio-keys-polled-event" 40``` 41 42## Example 43 44```json 45[ 46 { 47 "name": "fan0", 48 "path": "/system/chassis/motherboard/fan0", 49 "methods": [ 50 { 51 "type": "tach", 52 "sensors": ["fan0_0"] 53 } 54 ], 55 "rpolicy": { 56 "type": "anyof" 57 } 58 } 59] 60``` 61