forked from Minki/linux
6dcf2fb5e8
The pmbus core may call read/write word data functions with a page value
of -1, intending to perform the operation without setting the page.
However, the read/write word data functions accept only unsigned 8-bit
page numbers, and therefore cannot check for negative page number to
avoid setting the page. This results in setting the page number to 0xFF.
This may result in errors or undefined behavior of some devices
(specifically the ir35221, which allows the page to be set to 0xFF,
but some subsequent operations to read registers may fail).
Switch the pmbus_set_page page parameter to an integer and perform the
check for negative page there. Make read/write functions consistent in
accepting an integer page number parameter.
Signed-off-by: Edward A. James <eajames@us.ibm.com>
Fixes:
|
||
---|---|---|
.. | ||
adm1275.c | ||
ibm-cffps.c | ||
ir35221.c | ||
Kconfig | ||
lm25066.c | ||
ltc2978.c | ||
ltc3815.c | ||
Makefile | ||
max8688.c | ||
max16064.c | ||
max20751.c | ||
max34440.c | ||
pmbus_core.c | ||
pmbus.c | ||
pmbus.h | ||
tps40422.c | ||
tps53679.c | ||
ucd9000.c | ||
ucd9200.c | ||
zl6100.c |