Changeset 5422

Show
Ignore:
Timestamp:
11/24/08 17:55:48 (6 years ago)
Author:
khali
Message:

Merge all Mozart-2 entries. We really don't need 3 entries for this
especially when we don't even support these chips.

Files:
1 modified

Legend:

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

    r5421 r5422  
    783783     }, 
    784784     { 
    785        name => "Asus ASM58 Mozart-2", 
    786        driver => "to-be-written", 
    787        i2c_addrs => [0x77], 
    788        i2c_detect => sub { mozart_detect(@_, 0); }, 
    789      }, 
    790      { 
    791        name => "Asus AS2K129R Mozart-2", 
    792        driver => "to-be-written", 
    793        i2c_addrs => [0x77], 
    794        i2c_detect => sub { mozart_detect(@_, 1); }, 
    795      }, 
    796      { 
    797785       name => "Asus Mozart-2", 
    798786       driver => "to-be-written", 
    799787       i2c_addrs => [0x77], 
    800        i2c_detect => sub { mozart_detect(@_, 2); }, 
     788       i2c_detect => sub { mozart_detect(@_); }, 
    801789     }, 
    802790     { 
     
    43574345} 
    43584346 
    4359 # Chip to detect: 0 = ASM58, 1 = AS2K129R, 2 = ??? 
    43604347# Registers used: 
    43614348#   0x4e: Vendor ID high byte 
     
    43664353sub mozart_detect 
    43674354{ 
    4368   my ($file, $addr, $chip) = @_; 
     4355  my ($file, $addr) = @_; 
    43694356  my ($vid, $dev); 
    43704357 
     
    43734360  $dev = i2c_smbus_read_byte_data($file, 0x58); 
    43744361 
    4375   return if ($chip == 0) and ($dev != 0x56 || $vid != 0x9436); 
    4376   return if ($chip == 1) and ($dev != 0x56 || $vid != 0x9406); 
    4377   return if ($chip == 2) and ($dev != 0x10 || $vid != 0x5ca3); 
     4362  return unless ($dev == 0x56 && $vid == 0x9436)  # ASM58 
     4363             || ($dev == 0x56 && $vid == 0x9406)  # AS2K129R 
     4364             || ($dev == 0x10 && $vid == 0x5ca3); 
    43784365 
    43794366  return 5;