Changeset 850

Show
Ignore:
Timestamp:
07/25/00 03:07:00 (14 years ago)
Author:
mds
Message:

(mds) add LM87 detection (no driver)

Location:
lm-sensors/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r849 r850  
    1919  Program sensors: new switch -u (--unknown) 
    2020  Program sensors-detect: detect Intel 82801BA (815E chipset) 
     21  Program sensors-detect: detect National LM87 (no driver yet) 
    2122 
    22232.5.2 (20000709) 
  • lm-sensors/trunk/doc/chips/SUMMARY

    r807 r850  
    8080        lm80            1       7       2       -       yes     no 
    8181 
     82lm87-to-be-written 
     83        lm87            2-3     6-8     0-2     1 pwm   yes     no 
     84 
    8285maxilife 
    8386        maxilife-as     5       4       3       -       yes     no 
  • lm-sensors/trunk/prog/detect/sensors-detect

    r849 r850  
    255255            w83781d_isa_detect gl518sm_detect gl520sm_detect adm9240_detect  
    256256            adm1021_detect sis5595_isa_detect eeprom_detect via686a_isa_detect 
    257             adm1022_detect ltc1710_detect gl525sm_detect ddcmonitor_detect); 
     257            adm1022_detect ltc1710_detect gl525sm_detect lm87_detect 
     258            ddcmonitor_detect); 
    258259 
    259260# This is a list of all recognized chips.  
     
    322323       i2c_addrs => [0x28..0x2f], 
    323324       i2c_detect => sub { lm80_detect @_} , 
     325     }, 
     326     { 
     327       name => "National Semiconductor LM87", 
     328#        driver => "xxxxxxx", 
     329       i2c_addrs => [0x2c..0x2e], 
     330       i2c_detect => sub { lm87_detect @_} , 
    324331     }, 
    325332     { 
     
    14501457} 
    14511458   
     1459# $_[0]: A reference to the file descriptor to access this chip. 
     1460#        We may assume an i2c_set_slave_addr was already done. 
     1461# $_[1]: Address 
     1462# Returns: undef if not detected, (7) if detected. 
     1463# Registers used: 0x3E, 0x3F 
     1464#        Assume lower 2 bits of reg 0x3F are for revisions. 
     1465sub lm87_detect 
     1466{ 
     1467  my ($file,$addr) = @_; 
     1468  return if (i2c_smbus_read_byte_data($file,0x3e)) != 0x02; 
     1469  return if (i2c_smbus_read_byte_data($file,0x3f) & 0xfc) != 0x04; 
     1470  return (7); 
     1471} 
     1472   
    14521473# $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 2 = W83783S, 
    14531474#                        3 = W83627HF, 4 = AS99127F)