Changeset 5779
- Timestamp:
- 10/03/09 12:38:14 (4 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
r5773 r5779 19 19 Add detection for AMD Family 11h thermal sensors 20 20 Add detection for Intel Atom thermal sensors 21 Add detection for National Semiconductor LM73 21 22 sysconfig-lm_sensors-convert: Fix exit code 22 23 -
lm-sensors/trunk/prog/detect/sensors-detect
r5774 r5779 949 949 i2c_detect => sub { lm63_detect(@_, 2); }, 950 950 }, { 951 name => "National Semiconductor LM73", 952 driver => "lm73", 953 i2c_addrs => [0x48..0x4a, 0x4c..0x4e], 954 i2c_detect => sub { lm73_detect(@_); }, 955 }, { 951 956 name => "National Semiconductor LM92", 952 957 driver => "lm92", … … 3583 3588 return 6 if $cur <= 100 and ($hyst >= 10 && $hyst <= 125) 3584 3589 and ($os >= 20 && $os <= 127) and $hyst < $os; 3590 return 3; 3591 } 3592 3593 # Registers used: 3594 # 0x00: Temperature 3595 # 0x01: Configuration 3596 # 0x02: High Limit 3597 # 0x03: Low Limit 3598 # 0x04: Status 3599 # 0x07: Manufacturer ID and Product ID 3600 sub lm73_detect 3601 { 3602 my ($file, $addr) = @_; 3603 3604 my $conf = i2c_smbus_read_byte_data($file, 0x01); 3605 my $status = i2c_smbus_read_byte_data($file, 0x04); 3606 3607 # Bits that always return 0 3608 return if ($conf & 0x0c) or ($status & 0x10); 3609 3610 return if i2c_smbus_read_word_data($file, 0x07) != 0x9001; 3611 3612 # Make sure the chip supports SMBus read word transactions 3613 my $cur = i2c_smbus_read_word_data($file, 0x00); 3614 return if $cur < 0; 3615 my $high = i2c_smbus_read_word_data($file, 0x02); 3616 return if $high < 0; 3617 my $low = i2c_smbus_read_word_data($file, 0x03); 3618 return if $low < 0; 3619 return if ($cur & 0x0300) or (($high | $low) & 0x1f00); 3620 3585 3621 return 3; 3586 3622 }
