Skip to content

Commit

Permalink
Enable adm1278 VOUT sampling
Browse files Browse the repository at this point in the history
The reset value of ADM1278 PMON_CONFIG register does not enable VOUT sampling.
This patch enables VOUT sampling in ADM1278 PMON_CONFIG register.

The patch fixes issue: https://github.com/openbmc/linux/issues/71.

Signed-off-by: Yi Li <adamliyi@msn.com>
  • Loading branch information
Yi Li authored and Joel Stanley committed May 11, 2016
1 parent 9371b4d commit 5911270
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/hwmon/pmbus/adm1275.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,19 @@ static int adm1275_probe(struct i2c_client *client,
tindex = 3;

info->func[0] |= PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT;

/* By default when reset VOUT is not enabled */
if (!(config & ADM1278_VOUT_EN)) {
config |= ADM1278_VOUT_EN;
ret = i2c_smbus_write_byte_data(client,
ADM1275_PMON_CONFIG, (u8)config);
if (ret < 0) {
dev_err(&client->dev,
"Fail to write ADM1275_PMON_CONFIG\n");
return ret;
}
}

if (config & ADM1278_TEMP1_EN)
info->func[0] |=
PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
Expand Down

0 comments on commit 5911270

Please sign in to comment.