Changeset 5494

Show
Ignore:
Timestamp:
12/01/08 18:02:47 (4 years ago)
Author:
khali
Message:

Drop alias detection for Super-I/O chips. It never actually worked,
because the code compares the chip names first and we never cared of
using the exact same name string for I2C and Super-I/O entries of
a given chip. Anyway, we do not have any Super-I/O driver also
doing I2C access so detecting aliases wouldn't be that usesul. And
as I've said before, alias detection is better handled at the kernel
level anyway.

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r5473 r5494  
    3232                  Fix bus number prediction logic (#2327) 
    3333                  Suggest the sbs driver for smart batteries 
     34                  Drop alias detection for Super-I/O chips 
    3435 
    35363.0.3 (2008-09-28) 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5493 r5494  
    11251125#  devid_mask (optional): Bitmask to apply before checking the device ID 
    11261126#  logdev: The logical device containing the sensors 
    1127 #  alias_detect (optional): For chips which can be both on the LPC and the 
    1128 #      I2C bus, a function which detects whether two entries are the same. 
    1129 #      The function will be passed three parameters: the LPC address, an 
    1130 #      open file descriptor to access the I2C bus, and the I2C address. 
    11311127use vars qw(@superio_ids_natsemi @superio_ids_smsc @superio_ids_smsc_ns 
    11321128            @superio_ids_winbond @superio_ids_ite @superio_ids); 
     
    14501446                devid => 0x3c, 
    14511447                logdev => 0x0b, 
    1452                 alias_detect => sub { vt1211_alias_detect(@_); }, 
    14531448        }, { 
    14541449                name => "VIA VT1212 Super IO Lite",     # in 100 pin TQFP package 
     
    14641459                devid => 0x52, 
    14651460                logdev => 0x0b, 
    1466                 alias_detect => sub { winbond_alias_detect(@_, 0x2b, 0x3d); }, 
    14671461        }, { 
    14681462                name => "Winbond W83627THF/THG Super IO Sensors", 
     
    14981492                devid_mask => 0xFFC0, 
    14991493                logdev => 0x0b, 
    1500                 alias_detect => sub { winbond_alias_detect(@_, 0x2b, 0x3e); }, 
    15011494        }, { 
    15021495                name => "Winbond W83627DHG Super IO Sensors", 
     
    15051498                devid_mask => 0xFFF0, 
    15061499                logdev => 0x0b, 
    1507                 alias_detect => sub { winbond_alias_detect(@_, 0x2b, 0x3e); }, 
    15081500        }, { 
    15091501                name => "Winbond W83L517D Super IO", 
     
    15721564                devid => 0x8712, 
    15731565                logdev => 0x04, 
    1574                 alias_detect => sub { winbond_alias_detect(@_, 0x30, 0x45); }, 
    15751566        }, { 
    15761567                name => "ITE IT8716F Super IO Sensors", 
     
    29102901                chipname => $chip->{name} 
    29112902        }; 
    2912         add_isa_to_chips_detected($chip->{driver}, $new_hash, 
    2913                                   $chip->{alias_detect}); 
     2903        add_isa_to_chips_detected($chip->{driver}, $new_hash); 
    29142904} 
    29152905 
     
    46474637        for ($i = $first; $i <= $last; $i++) { 
    46484638                return 0 unless isa_read_i5d6($isa_addr, $i) == 
    4649                                 i2c_smbus_read_byte_data($file, $i); 
    4650         } 
    4651         return 1; 
    4652 } 
    4653  
    4654 sub vt1211_alias_detect 
    4655 { 
    4656         my ($isa_addr, $file, $i2c_addr) = @_; 
    4657         my $i; 
    4658  
    4659         return 0 unless (inb($isa_addr + 0x48) & 0x7f) == $i2c_addr; 
    4660         for ($i = 0x2b; $i <= 0x3d; $i++) { 
    4661                 return 0 unless inb($isa_addr + $i) == 
    46624639                                i2c_smbus_read_byte_data($file, $i); 
    46634640        }