Skip to content

Commit

Permalink
hwmon: (pmbus) cffps: Add PMBUS_SKIP_STATUS_CHECK
Browse files Browse the repository at this point in the history
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: f69316d ("hwmon: (pmbus) Add IBM Common Form Factor (CFF) ...")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Eddie James authored and Guenter Roeck committed Jan 8, 2018
1 parent 18c514c commit 4471879
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/hwmon/pmbus/ibm-cffps.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pmbus.h>

#include "pmbus.h"

Expand Down Expand Up @@ -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)
{
Expand All @@ -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;
Expand Down

0 comments on commit 4471879

Please sign in to comment.