Skip to contentSkip to conversation

hwmon: (pmbus) Remove page count

PATCH Superseded Guenter Roeck 1 participant 1 message Jul 12, 2011 Hardware monitoring

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 7/15 hwmon: (pmbus) Remove page count

Some PMBus chips have non-standard sensor registers. An easy way to support such sensors is to introduce virtual pages and map the non-standard registers into standard registers on an extra page.

For this to work, the code verifying if the configured number of pages exists has to be removed. Since a wrong number of pages can only be configured in a front-end driver, this should not have a practical impact since the resulting errors should be found during development and testing.

---
 drivers/hwmon/pmbus/pmbus_core.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
drivers/hwmon/pmbus/pmbus_core.c +0 -12
index abdc3a3..85d6136 100644
@@ -1541,18 +1541,6 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
 		ret = -EINVAL;
 		goto out_data;
 	}
-	/*
-	 * Bail out if more than one page was configured, but we can not
-	 * select the highest page. This is an indication that the wrong
-	 * chip type was selected. Better bail out now than keep
-	 * returning errors later on.
-	 */
-	if (info->pages > 1 && pmbus_set_page(client, info->pages - 1) < 0) {
-		dev_err(&client->dev, "Failed to select page %d\n",
-			info->pages - 1);
-		ret = -EINVAL;
-		goto out_data;
-	}
 
 	ret = pmbus_identify_common(client, data);
 	if (ret < 0) {
Signature · 7 lines
1.7.3.1


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors