hwmon: (pmbus) Always call _pmbus_read_byte in core driver

Always call _pmbus_read_byte() instead of pmbus_read_byte() in PMBus core
driver. With this change, device specific read functions can be implemented for
all registers.

Since the device specific read_byte function is now always called, we need to be
more careful with page validations. Only fail if the passed page number is larger
than 0, since -1 means "current page".

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Šī revīzija ir iekļauta:
Guenter Roeck
2011-07-29 22:19:39 -07:00
vecāks 179144a0d4
revīzija da8e48ab48
6 mainīti faili ar 17 papildinājumiem un 15 dzēšanām

Parādīt failu

@@ -166,8 +166,8 @@ static int lm25066_write_byte(struct i2c_client *client, int page, u8 value)
if (page > 1)
return -ENXIO;
if (page == 0)
return pmbus_write_byte(client, 0, value);
if (page <= 0)
return pmbus_write_byte(client, page, value);
return 0;
}