Changeset 784
- Timestamp:
- 03/19/00 23:06:54 (9 years ago)
- Files:
-
- lm-sensors/trunk/prog/detect/sensors-detect (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/prog/detect/sensors-detect
r776 r784 244 244 245 245 use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect 246 lm80_detect w83781d_detect w83781d_alias_detect 246 lm80_detect w83781d_detect w83781d_alias_detect adm1025_detect 247 247 w83781d_isa_detect gl518sm_detect gl520sm_detect adm9240_detect 248 248 adm1021_detect sis5595_isa_detect eeprom_detect via686a_isa_detect … … 400 400 i2c_addrs => [0x2c..0x2f], 401 401 i2c_detect => sub { adm9240_detect 2, @_ } 402 }, 403 { 404 name => "Analog Devices ADM1025", 405 # driver => "xxxxxxx", 406 i2c_addrs => [0x2c..0x2f], 407 i2c_detect => sub { adm1025_detect 0, @_ } 402 408 }, 403 409 { … … 1623 1629 } 1624 1630 1631 # $_[0]: Chip to detect (0 = ADM1025) 1632 # $_[1]: A reference to the file descriptor to access this chip. 1633 # We may assume an i2c_set_slave_addr was already done. 1634 # $_[2]: Address 1635 # Returns: undef if not detected, (8) if detected. 1636 # Registers used: 1637 # 0x3e: Company ID 1638 # 0x3f: Revision 1639 # 0x40: Configuration 1640 # Note: Detection overrules a previous LM78 or ADM9240 detection 1641 sub adm1025_detect 1642 { 1643 my $reg; 1644 my ($chip, $file,$addr) = @_; 1645 $reg = i2c_smbus_read_byte_data($file,0x3e); 1646 return unless ($chip == 0 and $reg == 0x41); 1647 return unless (i2c_smbus_read_byte_data($file,0x40) & 0x80) == 0x00; 1648 return unless (i2c_smbus_read_byte_data($file,0x3f) & 0xc0) == 0x20; 1649 1650 return (8); 1651 } 1652 1625 1653 # $_[0]: Chip to detect 1626 1654 # (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A, 3 = THMC10, 4 = LM84, 5 = GL523)
