mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 06:15:15 +00:00
(Phil) Altered LM75 detection slightly to find my LM75.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@284 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -1080,10 +1080,10 @@ sub lm75_detect
|
||||
my $conf = i2c_smbus_read_byte_data($file,0x01);
|
||||
my $hyst = i2c_smbus_read_word_data($file,0x02);
|
||||
my $os = i2c_smbus_read_word_data($file,0x03);
|
||||
for ($i = 0x00; $i <= 0xff; $i += 4) {
|
||||
return if i2c_smbus_read_byte_data($file,$i + 0x01) != $conf;
|
||||
return if i2c_smbus_read_word_data($file,$i + 0x02) != $hyst;
|
||||
return if i2c_smbus_read_word_data($file,$i + 0x03) != $os;
|
||||
for ($i = 0x00; $i <= 0xF; $i += 1) {
|
||||
return if i2c_smbus_read_byte_data($file,($i * 0x10) + 0x01) != $conf;
|
||||
return if i2c_smbus_read_word_data($file,($i * 0x10) + 0x02) != $hyst;
|
||||
return if i2c_smbus_read_word_data($file,($i * 0x10) + 0x03) != $os;
|
||||
}
|
||||
return (3);
|
||||
}
|
||||
|
Reference in New Issue
Block a user