Changeset 5407

Show
Ignore:
Timestamp:
11/24/08 13:42:00 (4 years ago)
Author:
khali
Message:

Get I2C adapter driver names from sysfs. The old method (matching against
regexp for known I2C adapters) is still used as a fallback, as early 2.6
kernels don't support the new method, and some drivers (i2c-viapro for
example) do not bind to their device so the new method doesn't work for
them.

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

    r5405 r5407  
    1818                  Handle special case chips more efficiently 
    1919                  Fix SMBus detection of W83627EHF and W83627DHG 
     20                  Get I2C adapter driver names from sysfs (#2328) 
    2021 
    21223.0.3 (2008-09-28) 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5405 r5407  
    23672367                    || sysfs_device_attribute("${class_dir}/i2c-$1/device", "name"); 
    23682368    next if $entry->{'name'} eq "ISA main adapter"; 
    2369     $entry->{'driver'} = find_adapter_driver($entry->{'name'}); 
     2369 
     2370    # First try to get the I2C adapter driver name from sysfs, and if it 
     2371    # fails, fall back to searching our list of known I2C adapters. 
     2372    $entry->{'driver'} = sysfs_device_driver("${class_dir}/i2c-$1/device") 
     2373                      || find_adapter_driver($entry->{'name'}); 
    23702374    $i2c_adapters[$1] = $entry; 
    23712375  }