aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus/pmbus.h
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-07-09 10:41:01 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-07-28 20:02:15 -0400
commit9c1ed8941d30fd6252e84a9941e6507e497d242b (patch)
tree5c46c60dafa61427931ab66897a0443e49280894 /drivers/hwmon/pmbus/pmbus.h
parent46243f3ab44ad0d2e9ca62e6485ca433659f3881 (diff)
hwmon: (pmbus) Add support for virtual pages
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. Also, functions to read the chip status while checking if a command register exists must be modified to no longer set the page register before reading the status, since the physical page associated with the checked register may not exist. This does not make a functional difference since the page was already set when the attempt to read the register was made. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Diffstat (limited to 'drivers/hwmon/pmbus/pmbus.h')
-rw-r--r--drivers/hwmon/pmbus/pmbus.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
index d631caeda106..ceb71f7b91ac 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -303,7 +303,7 @@ struct pmbus_driver_info {
303int pmbus_set_page(struct i2c_client *client, u8 page); 303int pmbus_set_page(struct i2c_client *client, u8 page);
304int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg); 304int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg);
305int pmbus_write_word_data(struct i2c_client *client, u8 page, u8 reg, u16 word); 305int pmbus_write_word_data(struct i2c_client *client, u8 page, u8 reg, u16 word);
306int pmbus_read_byte_data(struct i2c_client *client, u8 page, u8 reg); 306int pmbus_read_byte_data(struct i2c_client *client, int page, u8 reg);
307void pmbus_clear_faults(struct i2c_client *client); 307void pmbus_clear_faults(struct i2c_client *client);
308bool pmbus_check_byte_register(struct i2c_client *client, int page, int reg); 308bool pmbus_check_byte_register(struct i2c_client *client, int page, int reg);
309bool pmbus_check_word_register(struct i2c_client *client, int page, int reg); 309bool pmbus_check_word_register(struct i2c_client *client, int page, int reg);