]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (pmbus) Add support for virtual pages
authorGuenter Roeck <guenter.roeck@ericsson.com>
Sat, 9 Jul 2011 14:41:01 +0000 (07:41 -0700)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Fri, 15 Jul 2011 15:10:19 +0000 (08:10 -0700)
commit990d124f51d90fc62df252b01a4a1b0d53b9cb45
tree0c7b8682550b83be5bebc4a966ed503befc662ef
parentadc91b75bf769581d6f88aa81b7637771f66f2b1
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>
drivers/hwmon/pmbus/pmbus.h
drivers/hwmon/pmbus/pmbus_core.c