mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 14:43:16 +00:00
hwmon: (lm78) Prevent misdetection of Winbond chips
The LM78 detection is relatively weak, and sometimes recent Winbond chips can be misdetected as an LM78. We have had repeated reports of this happening. We have an explicit check against this for the ISA access, do the same for I2C access now. Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
18c73f9042
commit
ad3273be8e
@ -613,6 +613,12 @@ static int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
err = -ENODEV;
|
||||
goto ERROR2;
|
||||
}
|
||||
/* Explicitly prevent the misdetection of Winbond chips */
|
||||
i = lm78_read_value(data, 0x4f);
|
||||
if (i == 0xa3 || i == 0x5c) {
|
||||
err = -ENODEV;
|
||||
goto ERROR2;
|
||||
}
|
||||
}
|
||||
|
||||
/* Determine the chip type. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user