Changeset 4260
- Timestamp:
- 12/10/06 14:50:54 (6 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/detect/sensors-detect (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r4256 r4260 34 34 Add Intel ICH9 detection 35 35 Add Maxim MAX6648/MAX6692 detection 36 Improve ADM1029 detection 36 37 37 38 -
lm-sensors/trunk/prog/detect/sensors-detect
r4258 r4260 3710 3710 # (0 = ADM1029) 3711 3711 # $_[1]: A reference to the file descriptor to access this chip. 3712 # We may assume an i2c_set_slave_addr was already done. 3713 # $_[2]: Address 3714 # Returns: undef if not detected, 3 to 9 if detected. 3712 # $_[2]: Address (unused) 3713 # Returns: undef if not detected, 6 if detected. 3715 3714 # Registers used: 3716 3715 # 0x02, 0x03: Fan support 3717 # 0x05: GPIO config3718 3716 # 0x07, 0x08, 0x09: Fan config 3719 3717 # 0x0d: Manufacturer ID … … 3724 3722 my $mid = i2c_smbus_read_byte_data($file, 0x0d); 3725 3723 my $cid = i2c_smbus_read_byte_data($file, 0x0e); 3726 my $fansc = i2c_smbus_read_byte_data($file, 0x02);3727 my $fanss = i2c_smbus_read_byte_data($file, 0x03);3728 my $gpio = i2c_smbus_read_byte_data($file, 0x05);3729 my $fanas = i2c_smbus_read_byte_data($file, 0x07);3730 my $fanhps = i2c_smbus_read_byte_data($file, 0x08);3731 my $fanfs = i2c_smbus_read_byte_data($file, 0x09);3732 my $confidence = 3;3733 3724 3734 3725 if ($chip == 0) { 3735 return if $mid != 0x41; # Analog Devices 3736 $confidence++ if ($cid & 0xF0) == 0x00; # ADM1029 3737 $confidence+=2 if ($fansc & 0xFC) == 0x00 3738 && ($fanss & 0xFC) == 0x00; 3739 $confidence+=2 if ($fanas & 0xFC) == 0x00 3740 && ($fanhps & 0xFC) == 0x00 3741 && ($fanfs & 0xFC) == 0x00; 3742 $confidence++ if ($gpio & 0x80) == 0x00; 3743 return $confidence; 3726 return unless $mid == 0x41; # Analog Devices 3727 return unless ($cid & 0xF0) == 0x00; # ADM1029 3728 3729 # Extra check on unused bits 3730 foreach my $reg (0x02, 0x03, 0x07, 0x08, 0x09) { 3731 my $fancfg = i2c_smbus_read_byte_data($file, $reg); 3732 return unless ($fancfg & 0xFC) == 0x00; 3733 } 3734 3735 return 7; 3744 3736 } 3745 3737 return;
