Changeset 5270
- Timestamp:
- 05/28/08 14:36:57 (5 years ago)
- Location:
- lm-sensors/branches/lm-sensors-3.0.0
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/detect/sensors-detect (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/CHANGES
r5266 r5270 7 7 Improve MAX6657, MAX6658, MAX6659 detection 8 8 Cache the byte data reads (#2326) 9 Add Maxim MAX6654/MAX6690 support 10 Add National Semiconductor LM95231 support 11 Add Analog Devices ADT7481 support 9 12 10 13 3.0.2 (2008-05-18) -
lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect
r5269 r5270 1093 1093 }, 1094 1094 { 1095 name => "Maxim MAX6654/MAX6690", 1096 driver => "to-be-written", # probably lm90 1097 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 1098 i2c_detect => sub { lm90_detect(4, @_); }, 1099 }, 1100 { 1095 1101 name => "Maxim MAX6657/MAX6658/MAX6659", 1096 1102 driver => "lm90", … … 1127 1133 i2c_addrs => [0x4c], 1128 1134 i2c_detect => sub { lm90_detect(9, @_); }, 1135 }, 1136 { 1137 name => "National Semiconductor LM95231", 1138 driver => "to-be-written", 1139 i2c_addrs => [0x2b, 0x19, 0x2a], 1140 i2c_detect => sub { lm95231_detect(@_); }, 1129 1141 }, 1130 1142 { … … 1171 1183 i2c_addrs => [0x4c..0x4d], 1172 1184 i2c_detect => sub { lm90_detect(5, @_); }, 1185 }, 1186 { 1187 name => "Analog Devices ADT7481", 1188 driver => "to-be-written", 1189 i2c_addrs => [0x4c, 0x4b], 1190 i2c_detect => sub { adt7481_detect(@_); }, 1173 1191 }, 1174 1192 { … … 3958 3976 3959 3977 # $_[0]: Chip to detect 3960 # (0 = LM90, 1 = LM89/LM99, 2 = LM86, 3 = ADM1032, 3978 # (0 = LM90, 1 = LM89/LM99, 2 = LM86, 3 = ADM1032, 4 = MAX6654/MAX6690, 3961 3979 # 5 = ADT7461, 6 = MAX6648/MAX6692, 7 = MAX6680/MAX6681, 3962 3980 # 8 = W83L771W/G, 9 = TI TMP401) … … 4005 4023 return 6 if ($cid & 0xf0) == 0x40; # ADM1032 4006 4024 } 4025 if ($chip == 4) { 4026 return if ($conf & 0x07) != 0; 4027 return if $rate > 0x07; 4028 return if $mid != 0x4d; # Maxim 4029 return if $cid != 0x08; # MAX6654/MAX6690 4030 return 8; 4031 } 4007 4032 if ($chip == 5) { 4008 4033 return if ($conf & 0x1b) != 0; … … 4072 4097 4073 4098 return 5; 4099 } 4100 4101 # $_[0]: A reference to the file descriptor to access this chip. 4102 # $_[1]: Address 4103 # Returns: undef if not detected, 6 if detected. 4104 # Registers used: 4105 # 0x03: Configuration 4106 # 0xfe: Manufacturer ID 4107 # 0xff: Revision ID 4108 sub lm95231_detect 4109 { 4110 my ($file, $addr) = @_; 4111 my $mid = i2c_smbus_read_byte_data($file, 0xfe); 4112 my $cid = i2c_smbus_read_byte_data($file, 0xff); 4113 my $conf = i2c_smbus_read_byte_data($file, 0x03); 4114 4115 return if ($conf & 0x89) != 0; 4116 return if $mid != 0x01; # National Semiconductor 4117 return if $cid != 0xa1; # LM95231 4118 4119 return 6; 4120 } 4121 4122 # $_[0]: A reference to the file descriptor to access this chip. 4123 # $_[1]: Address 4124 # Returns: undef if not detected, 6 if detected. 4125 # Registers used: 4126 # 0x03: Configuration 1 4127 # 0x24: Configuration 2 4128 # 0x3d: Manufacturer ID 4129 # 0x3e: Device ID 4130 sub adt7481_detect 4131 { 4132 my ($file, $addr) = @_; 4133 my $mid = i2c_smbus_read_byte_data($file, 0x3d); 4134 my $cid = i2c_smbus_read_byte_data($file, 0x3e); 4135 my $conf1 = i2c_smbus_read_byte_data($file, 0x03); 4136 my $conf2 = i2c_smbus_read_byte_data($file, 0x24); 4137 4138 return if ($conf1 & 0x10) != 0; 4139 return if ($conf2 & 0x7f) != 0; 4140 return if $mid != 0x41; # Analog Devices 4141 return if $cid != 0x81; # ADT7481 4142 4143 return 6; 4074 4144 } 4075 4145
