From 869a6b7f81c224f5be5b9ae3604b94251e1afe16 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 10 Sep 2008 07:28:17 +0000 Subject: [PATCH] Prevent misdetection of W83627DHG (and more generally, Winbond chips) on I2C as LM78. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5333 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + prog/detect/sensors-detect | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index ab7d5f2d..d8742a0f 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,7 @@ SVN-HEAD Add SMSC EMC2700LPC support Add ITE IT8720 support Add Texas Instruments TMP411 support + Prevent misdetection of W83627DHG on I2C as LM78 2.10.7 (20080701) Library: Don't choke on unrecognized devices, part 2 diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 472fcbfe..49f94c19 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -3547,6 +3547,11 @@ sub lm78_detect return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20)) or ($chip == 1 and $reg == 0x40) or ($chip == 2 and ($reg & 0xfe) == 0xc0); + + # Explicitly prevent misdetection of Winbond chips + $reg = i2c_smbus_read_byte_data($file, 0x4f); + return if $reg == 0xa3 || $reg == 0x5c; + return (6); }