Andrew Jeffery cf583b4275 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>
2018-01-02 15:05:34 -08:00
..
2011-03-31 11:26:23 -03:00
2011-10-24 11:09:41 -07:00
2014-03-03 08:01:04 -08:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2008-11-12 17:17:17 -08:00
2017-06-11 17:08:19 -07:00
2005-07-11 14:47:41 -07:00
2012-10-10 15:25:56 +02:00
2012-12-05 10:55:55 -08:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2016-04-19 06:32:38 -07:00
2014-01-29 20:40:08 +01:00
2015-10-14 07:57:14 -07:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2011-03-14 22:36:25 -07:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2011-01-18 12:22:54 -08:00
2016-03-05 06:25:34 -08:00
2011-03-14 22:39:11 -07:00
2012-09-23 21:08:33 -07:00
2014-01-29 20:40:08 +01:00
2011-03-14 22:36:24 -07:00
2011-05-19 08:19:32 -07:00
2015-10-14 07:57:14 -07:00
2012-09-23 21:08:36 -07:00
2014-05-21 16:02:27 -07:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2014-08-04 07:01:38 -07:00
2017-10-29 18:36:03 -07:00
2014-01-29 20:40:08 +01:00
2015-06-21 22:54:53 -07:00
2010-05-27 19:58:57 +02:00
2012-10-16 17:12:35 +01:00
2006-09-28 15:31:16 -07:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2018-01-02 15:05:34 -08:00
2011-03-31 11:26:23 -03:00
2013-09-06 14:05:42 +02:00
2014-01-29 20:40:08 +01:00
2012-04-05 16:58:23 -07:00
2016-09-08 21:34:16 -07:00