Changeset 5613

Show
Ignore:
Timestamp:
01/19/09 22:07:56 (4 years ago)
Author:
khali
Message:

Fix detection of older DS1621.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r5577 r5613  
    55  File lm_sensors.lsm: Delete, don't advertise a legacy branch 
    66  File doc/developers/release_checklist: Skip mail to lsm 
     7  Program sensors-detect: Fix detection of older DS1621 
    78 
    892.10.8 (20081216) 
  • lm-sensors/trunk/prog/detect/sensors-detect

    r5598 r5613  
    38643864  return if ($conf & 0x10); 
    38653865 
    3866   my $counter = i2c_smbus_read_byte_data($file, 0xA8); 
    3867   my $slope = i2c_smbus_read_byte_data($file, 0xA9); 
    3868   return if ($slope != 0x10 || $counter > $slope); 
    3869  
    38703866  my $temp = i2c_smbus_read_word_data($file, 0xAA); 
    38713867  return if $temp < 0 || ($temp & 0x0f00); 
     
    38803876  return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0); 
    38813877 
    3882   return 3; 
     3878  # Old versions of the DS1621 apparently don't have the counter and  
     3879  # slope registers (or they return crap)  
     3880  my $counter = i2c_smbus_read_byte_data($file, 0xA8); 
     3881  my $slope = i2c_smbus_read_byte_data($file, 0xA9); 
     3882  return ($slope == 0x10 && $counter <= $slope) ? 3 : 2; 
    38833883} 
    38843884