diff --git a/CHANGES b/CHANGES index 4d00887e..64197da0 100644 --- a/CHANGES +++ b/CHANGES @@ -58,6 +58,7 @@ SVN-HEAD Add Intel Core I7 support Generate new format for /etc/sysconfig/lm_sensors Print warnings about missing modules on screen + Fix detection of older DS1621 sensors-detect-stat.pl: Delete (functionality merged into sensors-detect) 3.0.3 (2008-09-28) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 8aef75d3..0f7004e3 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -3544,10 +3544,6 @@ sub ds1621_detect my $conf = i2c_smbus_read_byte_data($file, 0xAC); return if ($conf & 0x10); - my $counter = i2c_smbus_read_byte_data($file, 0xA8); - my $slope = i2c_smbus_read_byte_data($file, 0xA9); - return if ($slope != 0x10 || $counter > $slope); - my $temp = i2c_smbus_read_word_data($file, 0xAA); return if $temp < 0 || ($temp & 0x0f00); # On the DS1631, the following two checks are too strict in theory, @@ -3560,7 +3556,11 @@ sub ds1621_detect return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0); - return 3; + # Old versions of the DS1621 apparently don't have the counter and + # slope registers (or they return crap) + my $counter = i2c_smbus_read_byte_data($file, 0xA8); + my $slope = i2c_smbus_read_byte_data($file, 0xA9); + return ($slope == 0x10 && $counter <= $slope) ? 3 : 2; } # Registers used: