Changeset 4312
- Timestamp:
- 01/25/07 10:18:23 (6 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/detect/sensors-detect (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r4311 r4312 10 10 Drop legacy W83627HF ISA detection 11 11 Don't bufferize stdout during probes 12 Speed up the LM75 and LM77 detection 12 13 13 14 -
lm-sensors/trunk/prog/detect/sensors-detect
r4311 r4312 3315 3315 my ($file,$addr) = @_; 3316 3316 my $cur = i2c_smbus_read_word_data($file,0x00); 3317 my $cur_varies = 0;3318 3317 my $conf = i2c_smbus_read_byte_data($file,0x01); 3319 3318 … … 3330 3329 return if i2c_smbus_read_word_data($file,0x07) != $os; 3331 3330 3332 for ($i = 0x00; $i < 0xff; $i += 8) {3331 for ($i = 8; $i <= 248; $i += 40) { 3333 3332 return if i2c_smbus_read_byte_data($file, $i + 0x01) != $conf; 3334 3333 return if i2c_smbus_read_word_data($file, $i + 0x02) != $hyst; 3335 return if i2c_smbus_read_word_data($file, $i + 0x04) != $hyst;3336 return if i2c_smbus_read_word_data($file, $i + 0x05) != $hyst;3337 return if i2c_smbus_read_word_data($file, $i + 0x06) != $hyst;3338 return if i2c_smbus_read_word_data($file, $i + 0x07) != $hyst;3339 3334 return if i2c_smbus_read_word_data($file, $i + 0x03) != $os; 3340 return if i2c_smbus_read_word_data($file, $i + 0x04) != $os;3341 return if i2c_smbus_read_word_data($file, $i + 0x05) != $os;3342 return if i2c_smbus_read_word_data($file, $i + 0x06) != $os;3343 return if i2c_smbus_read_word_data($file, $i + 0x07) != $os;3344 $cur_varies = 13345 if (! $cur_varies) and3346 i2c_smbus_read_word_data($file, $i) != $cur;3347 3335 } 3348 3336 3349 3337 # All registers hold the same value, obviously a misdetection 3350 return if (! $cur_varies) and$conf == ($cur & 0xff) and $cur == $hyst3338 return if $conf == ($cur & 0xff) and $cur == $hyst 3351 3339 and $cur == $os; 3352 3340 … … 3390 3378 my ($file,$addr) = @_; 3391 3379 my $cur = i2c_smbus_read_word_data($file,0x00); 3392 my $cur_varies = 0;3393 3380 my $conf = i2c_smbus_read_byte_data($file,0x01); 3394 3381 my $hyst = i2c_smbus_read_word_data($file,0x02); … … 3403 3390 return if i2c_smbus_read_word_data($file,0x07) != $high; 3404 3391 3405 for ($i = 0x00; $i < 0xff; $i += 8) {3392 for ($i = 8; $i <= 248; $i += 40) { 3406 3393 return if i2c_smbus_read_byte_data($file, $i + 0x01) != $conf; 3407 3394 return if i2c_smbus_read_word_data($file, $i + 0x02) != $hyst; 3408 3395 return if i2c_smbus_read_word_data($file, $i + 0x03) != $os; 3409 3396 return if i2c_smbus_read_word_data($file, $i + 0x04) != $low; 3410 return if i2c_smbus_read_word_data($file, $i + 0x06) != $low;3411 return if i2c_smbus_read_word_data($file, $i + 0x07) != $low;3412 3397 return if i2c_smbus_read_word_data($file, $i + 0x05) != $high; 3413 return if i2c_smbus_read_word_data($file, $i + 0x06) != $high;3414 return if i2c_smbus_read_word_data($file, $i + 0x07) != $high;3415 $cur_varies = 13416 if (! $cur_varies) and3417 i2c_smbus_read_word_data($file, $i) != $cur;3418 3398 } 3419 3399 3420 3400 # All registers hold the same value, obviously a misdetection 3421 return if (! $cur_varies) and$conf == ($cur & 0xff) and $cur == $hyst3401 return if $conf == ($cur & 0xff) and $cur == $hyst 3422 3402 and $cur == $os and $cur == $low and $cur == $high; 3423 3403
