From 8536734576697fa2f5eb32d8bcaf1ed232a41fd7 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 31 Aug 2011 08:34:15 +0000 Subject: [PATCH] Make LM73 detection less problematic. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5994 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + prog/detect/sensors-detect | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 39f7ef4a..ed2abbcb 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ SVN HEAD Improve filtering of fake DMI data Print DMI system/product version if available Fix loading of the cpuid module + Make LM73 detection less problematic 3.3.1 (2011-07-21) isadump: Add support for word (16-bit) and long (32-bit) reads diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index e10dc9ff..b9b765fa 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -4044,7 +4044,9 @@ sub lm73_detect # Bits that always return 0 return if ($conf & 0x0c) or ($status & 0x10); - return if i2c_smbus_read_word_data($file, 0x07) != 0x9001; + # Test with byte read first to avoid confusing other chips + return if i2c_smbus_read_byte_data($file, 0x07) != 0x01 + or i2c_smbus_read_word_data($file, 0x07) != 0x9001; # Make sure the chip supports SMBus read word transactions my $cur = i2c_smbus_read_word_data($file, 0x00);