Changeset 605

Show
Ignore:
Timestamp:
10/20/99 04:53:38 (15 years ago)
Author:
mds
Message:

(mds) fix lm84/gl523 syntax errors. Add gl525 detection.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/detect/sensors-detect

    r604 r605  
    126126            w83781d_isa_detect gl518sm_detect gl520sm_detect adm9240_detect  
    127127            adm1021_detect sis5595_isa_detect eeprom_detect 
    128             adm1022_detect ltc1710_detect); 
     128            adm1022_detect ltc1710_detect gl525sm_detect); 
    129129 
    130130# This is a list of all recognized chips.  
     
    247247       driver => "gl520sm", 
    248248       i2c_addrs => [0x2c, 0x2d], 
    249        i2c_detect => sub { gl520sm_detect @_} , 
     249       i2c_detect => sub { gl520sm_detect, @_} , 
     250     }, 
     251     { 
     252       name => "Genesys Logic GL525SM", 
     253#        driver => "xxxxxxx", 
     254       i2c_addrs => [0x2d], 
     255       i2c_detect => sub { gl525sm_detect, @_} , 
    250256     }, 
    251257     { 
     
    292298     }, 
    293299     { 
    294        name => "National Semiconductor LM84" 
     300       name => "National Semiconductor LM84", 
    295301       driver => "adm1021", 
    296302       i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     
    298304     }, 
    299305     { 
    300        name => "Genesys Logic GL523SM" 
     306       name => "Genesys Logic GL523SM", 
    301307       driver => "adm1021", 
    302308       i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     
    13851391} 
    13861392 
     1393# $_[0]: A reference to the file descriptor to access this chip. 
     1394#        We may assume an i2c_set_slave_addr was already done. 
     1395# $_[1]: Address 
     1396# Returns: undef if not detected, (5) if detected. 
     1397# Registers used: 
     1398#   0x00: Device ID 
     1399# Mediocre detection 
     1400sub gl525sm_detect 
     1401{ 
     1402  my ($file,$addr) = @_; 
     1403  return unless i2c_smbus_read_byte_data($file,0x00) == 0x25; 
     1404  return (5); 
     1405} 
     1406 
    13871407# $_[0]: Chip to detect (0 = ADM9240, 1 = DS1780, 2 = LM81) 
    13881408# $_[1]: A reference to the file descriptor to access this chip.