Changeset 5708
- Timestamp:
- 04/06/09 19:05:54 (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
r5684 r5708 8 8 Use dmidecode to find IPMI interfaces if available 9 9 Add Nuvoton W83795G/ADG detection 10 Add National Semiconductor LM95241 detection 10 11 11 12 3.1.0 "Happy Birthday Lina" (2009-02-28) -
lm-sensors/trunk/prog/detect/sensors-detect
r5684 r5708 912 912 driver => "to-be-written", 913 913 i2c_addrs => [0x2b, 0x19, 0x2a], 914 i2c_detect => sub { lm95231_detect(@_); }, 914 i2c_detect => sub { lm95231_detect(@_, 0); }, 915 }, { 916 name => "National Semiconductor LM95241", 917 driver => "lm95241", 918 i2c_addrs => [0x2b, 0x19, 0x2a], 919 i2c_detect => sub { lm95231_detect(@_, 1); }, 915 920 }, { 916 921 name => "National Semiconductor LM63", … … 3908 3913 } 3909 3914 3915 # Chip to detect: 0 = LM95231, 1 = LM95241 3910 3916 # Registers used: 3911 # 0x03: Configuration 3917 # 0x02: Status (3 unused bits) 3918 # 0x03: Configuration (3 unused bits) 3919 # 0x06: Remote diode filter control (6 unused bits) 3920 # 0x30: Remote diode model type select (6 unused bits) 3912 3921 # 0xfe: Manufacturer ID 3913 3922 # 0xff: Revision ID 3914 3923 sub lm95231_detect 3915 3924 { 3916 my ($file, $addr ) = @_;3925 my ($file, $addr, $chip) = @_; 3917 3926 my $mid = i2c_smbus_read_byte_data($file, 0xfe); 3918 3927 my $cid = i2c_smbus_read_byte_data($file, 0xff); 3919 my $conf = i2c_smbus_read_byte_data($file, 0x03); 3920 3921 return if ($conf & 0x89) != 0; 3922 return if $mid != 0x01; # National Semiconductor 3923 return if $cid != 0xa1; # LM95231 3928 3929 return if $mid != 0x01; # National Semiconductor 3930 return if $chip == 0 && $cid != 0xa1; # LM95231 3931 return if $chip == 1 && $cid != 0xa4; # LM95231 3932 3933 return if i2c_smbus_read_byte_data($file, 0x02) & 0x70; 3934 return if i2c_smbus_read_byte_data($file, 0x03) & 0x89; 3935 return if i2c_smbus_read_byte_data($file, 0x06) & 0xfa; 3936 return if i2c_smbus_read_byte_data($file, 0x30) & 0xfa; 3924 3937 3925 3938 return 6;
