[linux,dev-4.10,2/5] hwmon: (pmbus) cffps: Add PMBUS_SKIP_STATUS_CHECK

Message ID 1515696437-10508-3-git-send-email-eajames@linux.vnet.ibm.com
State Accepted, archived
Headers show
  • hwmon (pmbus): cffps: reset to linux-next state
Related show

Commit Message

Eddie James Jan. 11, 2018, 6:47 p.m.
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.

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>
 drivers/hwmon/pmbus/ibm-cffps.c | 6 ++++++
 1 file changed, 6 insertions(+)


diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffps.c
index 1a6294c..3269617 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 int ibm_cffps_read_word_data(struct i2c_client *client, int page,
 	.read_word_data = ibm_cffps_read_word_data,
+static struct pmbus_platform_data ibm_cffps_pdata = {
 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);