summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus
diff options
context:
space:
mode:
authorEddie James <eajames@linux.vnet.ibm.com>2018-01-08 22:10:09 +0100
committerGuenter Roeck <linux@roeck-us.net>2018-01-08 22:29:10 +0100
commit4471879acf926221231fe68ebc30f9cad0d7f7c8 (patch)
tree43f63e5d2030c729e232511b4adc8a4a0c4bfc43 /drivers/hwmon/pmbus
parenthwmon: (aspeed-pwm-tacho) Deassert reset in probe (diff)
downloadlinux-4471879acf926221231fe68ebc30f9cad0d7f7c8.tar.xz
linux-4471879acf926221231fe68ebc30f9cad0d7f7c8.zip
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. 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>
Diffstat (limited to 'drivers/hwmon/pmbus')
-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 de2547476253..2d6f4f41e736 100644
--- a/drivers/hwmon/pmbus/ibm-cffps.c
+++ b/drivers/hwmon/pmbus/ibm-cffps.c
@@ -15,6 +15,7 @@
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/mutex.h>
+#include <linux/pmbus.h>
#include "pmbus.h"
@@ -268,6 +269,10 @@ 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)
{
@@ -276,6 +281,7 @@ static int ibm_cffps_probe(struct i2c_client *client,
struct dentry *ibm_cffps_dir;
struct ibm_cffps *psu;
+ client->dev.platform_data = &ibm_cffps_pdata;
rc = pmbus_do_probe(client, id, &ibm_cffps_info);
if (rc)
return rc;