diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2017-11-20 07:42:06 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2018-01-03 02:05:34 +0300 |
commit | cf583b4275761754638c946ff777546d1a9b6744 (patch) | |
tree | 1148c9ee65f4f716352c7d9d2a8b5f79611d9453 /drivers/remoteproc/qcom_adsp_pil.c | |
parent | 464df6fa3766784b85b00d56cd4d7c706aee5375 (diff) | |
download | linux-cf583b4275761754638c946ff777546d1a9b6744.tar.xz |
hwmon: (pmbus/max31785) Add dual tachometer support
The dual tachometer feature is implemented in hardware with a TACHSEL
input to indicate the rotor under measurement, and exposed on the device
by extending the READ_FAN_SPEED_1 word with two extra bytes*. The need
to read the non-standard four-byte response leads to a cut-down
implementation of i2c_smbus_xfer_emulated() included in the driver.
Further, to expose the second rotor tachometer value to userspace the
values are exposed through virtual pages. We re-route accesses to
FAN_CONFIG_1_2 and READ_FAN_SPEED_1 on pages 23-28 (not defined by the
hardware) to the same registers on pages 0-5, and with the latter command
we extract the value from the second word of the four-byte response.
* The documentation recommends the slower rotor be associated with
TACHSEL=0, which corresponds to the first word of the response. The
TACHSEL=0 measurement is used by the controller's closed-loop fan
management to judge target fan rate.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/remoteproc/qcom_adsp_pil.c')
0 files changed, 0 insertions, 0 deletions