From 4da00e38a695773e59c97b935ff744ca655d9105 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sat, 24 Feb 2007 18:13:41 +0000 Subject: [PATCH] Fix ADM1028 detection. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4333 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + prog/detect/sensors-detect | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index cad9b0cf..1eef11d2 100644 --- a/CHANGES +++ b/CHANGES @@ -32,6 +32,7 @@ SVN HEAD Add Dallas DS75 detection Add SMSC LPC47M292 detection Add nVidia MCP61 and MCP65 detection + Fix ADM1028 detection 2.10.2 (20070115) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 8c34c657..7b7a4715 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -4351,10 +4351,10 @@ sub adm1022_detect ($chip == 1 and $reg == 0x49) or ($chip == 2 and $reg == 0x41); return unless (i2c_smbus_read_byte_data($file,0x40) & 0x80) == 0x00; - $reg = i2c_smbus_read_byte_data($file, 0x3f); - return unless ($reg & 0xc0) == 0xc0; - return if $chip == 0 and ($reg & 0xc0) != 0xc0; - return if $chip == 2 and ($reg & 0xc0) == 0xc0; + $reg = i2c_smbus_read_byte_data($file, 0x3f) & 0xf0; + return unless ($chip == 0 and $reg == 0xc0) or + ($chip == 1 and $reg == 0xc0) or + ($chip == 2 and $reg == 0xd0); return (8); }