summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEddie James <eajames@linux.vnet.ibm.com>2018-01-11 21:47:14 +0300
committerJoel Stanley <joel@jms.id.au>2018-01-16 20:54:27 +0300
commitdd710e71ee53b95f4cdacdd364b648263aea251a (patch)
tree8dfb81ca7ff49d184da7619f799cae598af2049e
parente151e191cdba5114b877dd5789e9580313b85e1c (diff)
downloadlinux-dd710e71ee53b95f4cdacdd364b648263aea251a.tar.xz
hwmon: (pmbus) cffps: Add PMBUS_SKIP_STATUS_CHECK
This power supply device regularly fails to read VOUT_MODE due to the CML bit going high. This results in an incorrect exponent used for the voltage data, and therefore the power supply reports incorrect voltage. Work around this by setting the pmbus flag to skip the CML check. OpenBMC-Staging-Count: 1 Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Fixes: f69316d62c70 ("hwmon: (pmbus) Add IBM Common Form Factor (CFF) ...") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r--drivers/hwmon/pmbus/ibm-cffps.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffps.c
index 1a6294c826ed..32696173b2cc 100644
--- a/drivers/hwmon/pmbus/ibm-cffps.c
+++ b/drivers/hwmon/pmbus/ibm-cffps.c
@@ -9,6 +9,7 @@
#include <linux/device.h>
#include <linux/i2c.h>
+#include <linux/i2c/pmbus.h>
#include <linux/jiffies.h>
#include <linux/module.h>
@@ -116,9 +117,14 @@ static struct pmbus_driver_info ibm_cffps_info = {
.read_word_data = ibm_cffps_read_word_data,
};
+static struct pmbus_platform_data ibm_cffps_pdata = {
+ .flags = PMBUS_SKIP_STATUS_CHECK,
+};
+
static int ibm_cffps_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
+ client->dev.platform_data = &ibm_cffps_pdata;
return pmbus_do_probe(client, id, &ibm_cffps_info);
}