Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267270
b: refs/heads/master
c: 179144a
h: refs/heads/master
v: v3
  • Loading branch information
Guenter Roeck committed Oct 24, 2011
1 parent 6c8ff89 commit d0d4f55
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ced29d422557feb4230ea6b0067f1e24c5bd83f7
refs/heads/master: 179144a0d4128e7588b3d613a14807402f5e7c37
8 changes: 4 additions & 4 deletions trunk/drivers/hwmon/pmbus/lm25066.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static int lm25066_read_word_data(struct i2c_client *client, int page, int reg)
int ret;

if (page > 1)
return -EINVAL;
return -ENXIO;

/* Map READ_VAUX into READ_VOUT register on page 1 */
if (page == 1) {
Expand Down Expand Up @@ -85,7 +85,7 @@ static int lm25066_read_word_data(struct i2c_client *client, int page, int reg)
break;
default:
/* No other valid registers on page 1 */
ret = -EINVAL;
ret = -ENXIO;
break;
}
goto done;
Expand Down Expand Up @@ -138,7 +138,7 @@ static int lm25066_write_word_data(struct i2c_client *client, int page, int reg,
int ret;

if (page > 1)
return -EINVAL;
return -ENXIO;

switch (reg) {
case PMBUS_IIN_OC_WARN_LIMIT:
Expand All @@ -164,7 +164,7 @@ static int lm25066_write_word_data(struct i2c_client *client, int page, int reg,
static int lm25066_write_byte(struct i2c_client *client, int page, u8 value)
{
if (page > 1)
return -EINVAL;
return -ENXIO;

if (page == 0)
return pmbus_write_byte(client, 0, value);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/hwmon/pmbus/max8688.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static int max8688_read_word_data(struct i2c_client *client, int page, int reg)
int ret;

if (page)
return -EINVAL;
return -ENXIO;

switch (reg) {
case PMBUS_VIRT_READ_VOUT_MAX:
Expand Down Expand Up @@ -102,7 +102,7 @@ static int max8688_read_byte_data(struct i2c_client *client, int page, int reg)
int mfg_status;

if (page)
return -EINVAL;
return -ENXIO;

switch (reg) {
case PMBUS_STATUS_VOUT:
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/hwmon/pmbus/pmbus_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int pmbus_set_page(struct i2c_client *client, u8 page)
rv = i2c_smbus_write_byte_data(client, PMBUS_PAGE, page);
newpage = i2c_smbus_read_byte_data(client, PMBUS_PAGE);
if (newpage != page)
rv = -EINVAL;
rv = -EIO;
else
data->currpage = page;
}
Expand Down Expand Up @@ -229,7 +229,7 @@ static int _pmbus_write_word_data(struct i2c_client *client, int page, int reg,
return status;
}
if (reg >= PMBUS_VIRT_BASE)
return -EINVAL;
return -ENXIO;
return pmbus_write_word_data(client, page, reg, word);
}

Expand Down Expand Up @@ -261,7 +261,7 @@ static int _pmbus_read_word_data(struct i2c_client *client, int page, int reg)
return status;
}
if (reg >= PMBUS_VIRT_BASE)
return -EINVAL;
return -ENXIO;
return pmbus_read_word_data(client, page, reg);
}

Expand Down Expand Up @@ -320,7 +320,7 @@ static int pmbus_check_status_cml(struct i2c_client *client)
if (status < 0 || (status & PB_STATUS_CML)) {
status2 = pmbus_read_byte_data(client, -1, PMBUS_STATUS_CML);
if (status2 < 0 || (status2 & PB_CML_FAULT_INVALID_COMMAND))
return -EINVAL;
return -EIO;
}
return 0;
}
Expand Down Expand Up @@ -1682,7 +1682,7 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
if (info->pages <= 0 || info->pages > PMBUS_PAGES) {
dev_err(&client->dev, "Bad number of PMBus pages: %d\n",
info->pages);
ret = -EINVAL;
ret = -ENODEV;
goto out_data;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/hwmon/pmbus/ucd9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static int ucd9000_read_byte_data(struct i2c_client *client, int page, int reg)
switch (reg) {
case PMBUS_FAN_CONFIG_12:
if (page)
return -EINVAL;
return -ENXIO;

ret = ucd9000_get_fan_config(client, 0);
if (ret < 0)
Expand All @@ -89,7 +89,7 @@ static int ucd9000_read_byte_data(struct i2c_client *client, int page, int reg)
break;
case PMBUS_FAN_CONFIG_34:
if (page)
return -EINVAL;
return -ENXIO;

ret = ucd9000_get_fan_config(client, 2);
if (ret < 0)
Expand Down

0 comments on commit d0d4f55

Please sign in to comment.