Changeset 5416

Show
Ignore:
Timestamp:
11/24/08 15:56:18 (6 years ago)
Author:
khali
Message:

Drop separate LM78-J entry, we really have no good reason to handle
the LM78-J differently from the original LM78.

Files:
1 modified

Legend:

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

    r5415 r5416  
    537537       isa_addrs => [0x290], 
    538538       isa_detect => sub { lm78_isa_detect(0, @_); }, 
    539        alias_detect => sub { winbond_alias_detect(@_, 0x2b, 0x3d); }, 
    540      }, 
    541      { 
    542        name => "National Semiconductor LM78-J", 
    543        driver => "lm78", 
    544        i2c_addrs => [0x28..0x2f], 
    545        i2c_detect => sub { lm78_detect(1, @_); }, 
    546        isa_addrs => [0x290], 
    547        isa_detect => sub { lm78_isa_detect(1, @_); }, 
    548539       alias_detect => sub { winbond_alias_detect(@_, 0x2b, 0x3d); }, 
    549540     }, 
     
    33933384} 
    33943385 
    3395 # $_[0]: Chip to detect (0 = LM78, 1 = LM78-J, 2 = LM79) 
     3386# $_[0]: Chip to detect (0 = LM78, 2 = LM79) 
    33963387# $_[1]: A reference to the file descriptor to access this chip. 
    33973388# $_[2]: Address 
     
    34083399  return unless (i2c_smbus_read_byte_data($file, 0x40) & 0x80) == 0x00; 
    34093400  $reg = i2c_smbus_read_byte_data($file, 0x49); 
    3410   return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20)) or 
    3411                     ($chip == 1 and $reg == 0x40) or 
     3401  return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20 or $reg == 0x40)) or 
    34123402                    ($chip == 2 and ($reg & 0xfe) == 0xc0); 
    34133403 
     
    34193409} 
    34203410 
    3421 # $_[0]: Chip to detect (0 = LM78, 1 = LM78-J, 2 = LM79) 
     3411# $_[0]: Chip to detect (0 = LM78, 2 = LM79) 
    34223412# $_[1]: Address 
    34233413# Returns: undef if not detected, 6 if detected. 
     
    34393429  return unless (isa_read_i5d6($addr, 0x40) & 0x80) == 0x00; 
    34403430  my $reg = isa_read_i5d6($addr, 0x49); 
    3441   return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20)) or 
    3442                 ($chip == 1 and $reg == 0x40) or 
     3431  return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20 or $reg == 0x40)) or 
    34433432                ($chip == 2 and ($reg & 0xfe) == 0xc0); 
    34443433