linux/drivers/hwmon/pmbus
Chu Lin c04a482513 hwmon: (adm1275) Make sure we are reading enough data for different chips
[ Upstream commit 6d1d41c075 ]

Issue:
When PEC is enabled, binding adm1272 to the adm1275 would
fail due to PEC error. See below:
adm1275: probe of xxxx failed with error -74

Diagnosis:
Per the datasheet of adm1272, adm1278, adm1293 and amd1294,
PMON_CONFIG (0xd4) is 16bits wide. On the other hand,
PMON_CONFIG (0xd4) for adm1275 is 8bits wide. The driver should not
assume everything is 8bits wide and read only 8bits from it.

Solution:
If it is adm1272, adm1278, adm1293 and adm1294, use i2c_read_word.
Else, use i2c_read_byte

Testing:
Binding adm1272 to the driver.
The change is only tested on adm1272.

Signed-off-by: Chu Lin <linchuyuan@google.com>
Link: https://lore.kernel.org/r/20200709040612.3977094-1-linchuyuan@google.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-29 10:18:38 +02:00
..
Kconfig
Makefile
adm1275.c hwmon: (adm1275) Make sure we are reading enough data for different chips 2020-07-29 10:18:38 +02:00
ibm-cffps.c
inspur-ipsps.c
ir35221.c
ir38064.c
irps5401.c
isl68137.c
lm25066.c
ltc2978.c hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions. 2020-02-19 19:53:07 +01:00
ltc3815.c
max8688.c
max16064.c
max20751.c
max31785.c
max34440.c
pmbus.c
pmbus.h
pmbus_core.c
pxe1610.c
tps40422.c
tps53679.c
ucd9000.c
ucd9200.c
zl6100.c