Show
Ignore:
Timestamp:
06/11/08 16:09:15 (6 years ago)
Author:
khali
Message:

Add Texas Instruments THMC51 detection.

Files:
1 modified

Legend:

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

    r5279 r5281  
    12371237       i2c_addrs => [0x2e], 
    12381238       i2c_detect => sub { adm1022_detect(2, @_); }, 
     1239     }, 
     1240     { 
     1241       name => "Texas Instruments THMC51", 
     1242       driver => "to-be-written", # thmc50 
     1243       i2c_addrs => [0x2e], # At least (no datasheet) 
     1244       i2c_detect => sub { adm1022_detect(3, @_); }, 
    12391245     }, 
    12401246     { 
     
    47744780} 
    47754781 
    4776 # $_[0]: Chip to detect (0 = ADM1022, 1 = THMC50, 2 = ADM1028) 
     4782# $_[0]: Chip to detect (0 = ADM1022, 1 = THMC50, 2 = ADM1028, 
     4783#                        3 = THMC51) 
    47774784# $_[1]: A reference to the file descriptor to access this chip. 
    47784785# $_[2]: Address 
     
    47904797  return unless ($chip == 0 and $reg == 0x41) or 
    47914798                ($chip == 1 and $reg == 0x49) or 
    4792                 ($chip == 2 and $reg == 0x41); 
     4799                ($chip == 2 and $reg == 0x41) or 
     4800                ($chip == 3 and $reg == 0x49); 
    47934801  $reg = i2c_smbus_read_byte_data($file, 0x40); 
    47944802  return if ($reg & 0x10);                      # Soft Reset always reads 0 
     
    47974805  return unless ($chip == 0 and $reg == 0xc0) or 
    47984806                ($chip == 1 and $reg == 0xc0) or 
    4799                 ($chip == 2 and $reg == 0xd0); 
     4807                ($chip == 2 and $reg == 0xd0) or 
     4808                ($chip == 3 and $reg == 0xd0); 
    48004809  return (8); 
    48014810}