summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2017-10-26 09:19:39 +0300
committerAndrew Jeffery <andrew@aj.id.au>2017-10-27 00:17:34 +0300
commit7f7c032a56a1ed21ff0932d3756d6190fdcb629c (patch)
treee2536c48a02be31b430621e79f92068e73eb8c09
parent875e147c08392cf9ad4d7cc1515266869753bb40 (diff)
downloadlinux-7f7c032a56a1ed21ff0932d3756d6190fdcb629c.tar.xz
hwmon: pmbus: max31785: Mark virtual pages as virtual
Avoid setting PAGE to a unsupported value on the MAX31785 to avoid errors from the hardware in circumstances that we know it will fail. The virtual pages are used to expose the non-standard tacho measurements for the second rotor of a dual-rotor fan. Maxim's implementation breaks with the PMBus standard by providing a four-byte response to what is usually a two-byte command. OpenBMC-Staging-Count: 1 Cc: Eddie James <eajames@linux.vnet.ibm.com> Cc: Matt Spinler <mspinler@linux.vnet.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Matt Spinler mspinler@linux.vnet.ibm.com
-rw-r--r--drivers/hwmon/pmbus/max31785.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/max31785.c b/drivers/hwmon/pmbus/max31785.c
index 6a0d289ad346..c862ab51e3af 100644
--- a/drivers/hwmon/pmbus/max31785.c
+++ b/drivers/hwmon/pmbus/max31785.c
@@ -436,6 +436,7 @@ static int max31785_of_fan_config(struct i2c_client *client,
info->pages = max(info->pages, virtual + 1);
info->func[virtual] |= PMBUS_HAVE_FAN12;
+ info->func[virtual] |= PMBUS_PAGE_VIRTUAL;
}
}