Changeset 4044

Show
Ignore:
Timestamp:
06/18/06 18:53:02 (7 years ago)
Author:
khali
Message:

sensors-detect: Handle the W83791D driver difference between kernels.
Patch from Charles Spirakis.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r4041 r4044  
    4141                           F75384S/M, F75387SG/RG and F81218D detection 
    4242                          Add Winbond W83793R/G detection 
     43                          Handle the W83791D driver difference between kernels 
    4344 
    4445 
  • lm-sensors/trunk/prog/detect/sensors-detect

    r4043 r4044  
    10661066     } , 
    10671067     { 
    1068        name => "Winbond W83791D", 
    1069        driver => "w83781d", 
    1070        i2c_addrs => [0x2c..0x2f], 
    1071        i2c_detect => sub { w83781d_detect 7, @_}, 
    1072      }, 
    1073      { 
    10741068       name => "Winbond W83792D", 
    10751069       driver => "w83792d", 
     
    16251619     }, 
    16261620); 
     1621 
     1622# Special case chip information goes here and would be included in 
     1623# the chip_special_cases routine below 
     1624use vars qw($chip_kern24_w83791d $chip_kern26_w83791d); 
     1625$chip_kern24_w83791d = { 
     1626        name => "Winbond W83791D", 
     1627        driver => "w83781d", 
     1628        i2c_addrs => [0x2c..0x2f], 
     1629        i2c_detect => sub { w83781d_detect 7, @_ }, 
     1630}; 
     1631 
     1632$chip_kern26_w83791d = { 
     1633        name => "Winbond W83791D", 
     1634        driver => "w83791d", 
     1635        i2c_addrs => [0x2c..0x2f], 
     1636        i2c_detect => sub { w83781d_detect 7, @_ }, 
     1637}; 
    16271638 
    16281639# This is a list of all recognized superio chips.  
     
    29022913################## 
    29032914 
     2915# This routine allows you to select which chips are optionally added to the 
     2916# chip detection list. The most common use is to allow for different chip 
     2917# detection/drivers based on different linux kernels 
     2918# This routine follows the pattern of the SiS adapter special cases 
     2919sub chip_special_cases 
     2920{ 
     2921        # Based on the kernel, add the appropriate chip structure to the 
     2922        # chip_ids detection list 
     2923        if (kernel_version_at_least(2, 6, 0)) { 
     2924                push @chip_ids, $chip_kern26_w83791d; 
     2925        } else { 
     2926                push @chip_ids, $chip_kern24_w83791d; 
     2927        } 
     2928} 
     2929 
    29042930# Each function returns a confidence value. The higher this value, the more 
    29052931# sure we are about this chip. A Winbond W83781D, for example, will be 
     
    52615287    } 
    52625288  } 
     5289 
     5290  # Before looking for chips, make sure any special case chips are 
     5291  # added to the chip_ids list 
     5292  chip_special_cases(); 
    52635293 
    52645294  print "\n We are now going to do the adapter probings. Some adapters may ",