diff options
author | Chu Lin <linchuyuan@google.com> | 2020-07-09 07:06:12 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2020-07-09 17:02:35 +0300 |
commit | 6d1d41c075a1a54ba03370e268171fec20e06563 (patch) | |
tree | 0c11b3f334f291397aedbed5c68baaf43f15d9cb /drivers/hwmon/wm8350-hwmon.c | |
parent | 14b0e83dc4f1e52b94acaeb85a18fd7fdd46d2dc (diff) | |
download | linux-6d1d41c075a1a54ba03370e268171fec20e06563.tar.xz |
hwmon: (adm1275) Make sure we are reading enough data for different chips
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>
Diffstat (limited to 'drivers/hwmon/wm8350-hwmon.c')
0 files changed, 0 insertions, 0 deletions