Patrick Venture | e620656 | 2018-03-08 15:36:53 -0800 | [diff] [blame] | 1 | fan2: /* Name of the sensor. */ |
| 2 | type: fan /* Type of sensor, fan, temp, margin */ |
| 3 | /* How the sensor can be read[1] */ |
| 4 | readpath: /xyz/openbmc_project/sensors/fan_tach/fan2 |
| 5 | /* How the sensor can be set[2] */ |
| 6 | writepath: /sys/class/hwmon/hwmon0/pwm1 |
| 7 | /* The minimum value used for scaling writes (int64) */ |
| 8 | min: 0 |
| 9 | /* The maximum value used for scaling writes (int64) */ |
| 10 | max: 255 |
| 11 | /* The timeout value for the sensor, used for failsafe, 0 means no timeout |
| 12 | * (int64) |
| 13 | */ |
| 14 | timeout: 0 |
| 15 | |
| 16 | [1] readpath has multiple options: |
| 17 | * If it has "/xyz/openbmc_project/extsensors/" in it, it's an EXTERNAL or |
| 18 | host-provided sensor. |
| 19 | * If it has "/xyz/openbmc_project/" in it, it's a sensor whose value is |
| 20 | received passively over dbus. |
| 21 | * If it has "/sys/" in it, it's a sensor read directly from sysfs. |
| 22 | |
| 23 | [2] |
| 24 | * This can be left blank if the sensor is read-only. |
| 25 | * If it has "/sys/" in it, it's a sensor written to sysfs. |
| 26 | * If min and max are non-zero, it'll convert the value to within the range. |
| 27 | and output that modified value. So, if it receives a value of .90 and min |
| 28 | is 0, and max is 255, it'll convert that to a value of 229.5 that is then |
| 29 | cast to int64_t. |