From 6cf8b4be862da870181ccadaa3b15d89f844d5a6 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 10 Sep 2008 07:22:06 +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/branches/lm-sensors-3.0.0@5331 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + prog/detect/sensors-detect | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index f97bedde..97397296 100644 --- a/CHANGES +++ b/CHANGES @@ -31,6 +31,7 @@ SVN-HEAD Add SMSC EMC2700LPC support Add ITE IT8720 support Add Texas Instruments TMP411 support + Prevent misdetection of W83627DHG on I2C as LM78 3.0.2 (2008-05-18) documentation: Delete the FAQ, now maintained on the wiki diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 629bb08a..fc7c7e51 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -3613,6 +3613,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); }