Changeset 5274

Show
Ignore:
Timestamp:
06/07/08 22:49:30 (5 years ago)
Author:
khali
Message:

Slightly improve alias detection of W83627EHF and W83627DHG.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5273 r5274  
    46704670 
    46714671# $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 3 = W83627HF, 
    4672 #                        9 = W83627EHF 10 = W83627DHG) 
     4672#                        9 = W83627EHF 10, = W83627DHG) 
    46734673# $_[1]: ISA address 
    46744674# $_[2]: I2C file handle 
     
    46784678  my ($chip, $isa_addr, $file, $i2c_addr) = @_; 
    46794679  my $i; 
     4680  my $max = ($chip == 9 || $chip == 10) ? 0x3e : 0x3d; 
    46804681 
    46814682  return 0 unless isa_read_i5d6($isa_addr, 0x48) == $i2c_addr; 
    4682   for ($i = 0x2b; $i <= 0x3d; $i ++) { 
     4683  for ($i = 0x2b; $i <= $max; $i ++) { 
    46834684    return 0 unless isa_read_i5d6($isa_addr, $i) == i2c_smbus_read_byte_data($file, $i); 
    46844685  }