hwmon: (pmbus) Add virtual page config bit
authorAndrew Jeffery <andrew@aj.id.au>
Mon, 20 Nov 2017 04:42:05 +0000 (15:12 +1030)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 2 Jan 2018 23:05:34 +0000 (15:05 -0800)
commit464df6fa3766784b85b00d56cd4d7c706aee5375
tree25f345a09131db8ee92c63f9762fac13618d76e1
parent56ad86b4b16e4b7154300d71f8e93cca64b98e92
hwmon: (pmbus) Add virtual page config bit

Some circumstances call for virtual pages, to expose multiple values
packed into an extended PMBus register in a manner non-compliant with
the PMBus standard. An example of this is the Maxim MAX31785 controller,
which extends the READ_FAN_SPEED_1 PMBus register from two to four bytes
to support tach readings for both rotors of a dual rotor fan. This extended
register contains two word-sized values, one reporting the rate of the
fastest rotor, the other the rate of the slowest. The concept of virtual
pages aids this situation by mapping the page number onto the value to be
selected from the vectored result.

We should not try to set virtual pages on the device as such a page
explicitly doesn't exist; add a flag so we can avoid doing so.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus.h
drivers/hwmon/pmbus/pmbus_core.c