diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 355664f8..8e499d74 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -3151,19 +3151,18 @@ sub lm92_detect # 0xAC: Configuration # Detection is weak. We check if bit 4 (NVB) is clear, because it is # unlikely to be set (would mean that EEPROM is currently being accessed). -# Temperature checkings will hopefully prevent LM75 chips from being -# detected as a DS1621. +# Temperature checkings will hopefully prevent LM75 or other chips from +# being detected as a DS1621. sub ds1621_detect { my $i; my ($file,$addr) = @_; my $temp = i2c_smbus_read_word_data($file,0xAA); - return if ($temp & 0x7F00); - $temp = i2c_smbus_read_word_data($file,0xA1); - return if ($temp & 0x7F00); - $temp = i2c_smbus_read_word_data($file,0xA2); - return if ($temp & 0x7F00); + my $high = i2c_smbus_read_word_data($file,0xA1); + my $low = i2c_smbus_read_word_data($file,0xA2); + return if ($temp | $high | $low) & 0x7F00; my $conf = i2c_smbus_read_byte_data($file,0xAC); + return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0); return 3 if ($conf & 0x10) == 0x00; return; }