Changeset 5118
- Timestamp:
- 02/03/08 22:05:29 (5 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/detect/sensors-detect (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r5109 r5118 40 40 Add Fintek F71858DG detection 41 41 Add Fintek F81216D detection (no sensors) 42 Add SMSC SCH5027D detection 42 43 Program unhide_ICH_SMBus: Add support for the 82801AA (ICH) 43 44 -
lm-sensors/trunk/prog/detect/sensors-detect
r5109 r5118 1412 1412 driver => "dme1737", 1413 1413 i2c_addrs => [0x2c..0x2e], 1414 i2c_detect => sub { dme1737_detect(@_); }, 1414 i2c_detect => sub { dme1737_detect(1, @_); }, 1415 }, 1416 { 1417 name => "SMSC SCH5027D-NW", 1418 driver => "dme1737", 1419 i2c_addrs => [0x2c..0x2e], 1420 i2c_detect => sub { dme1737_detect(2, @_); }, 1415 1421 }, 1416 1422 { … … 1897 1903 }, 1898 1904 { 1905 name => "SMSC SCH5027D-NW Super IO", 1906 # Hardware monitoring features are accessed on the SMBus 1907 driver => "via-smbus-only", 1908 devid => 0x89, 1909 }, 1910 { 1899 1911 name => "SMSC SCH5307-NS Super IO", 1900 1912 driver => "smsc47b397", … … 4343 4355 my ($vendor,$file,$addr) = @_; 4344 4356 return if (i2c_smbus_read_byte_data($file,0x3e)) != $vendor ; 4345 return if (i2c_smbus_read_byte_data($file,0x3f) & 0xf0) != 0x60; 4357 4358 my $verstep = i2c_smbus_read_byte_data($file,0x3f); 4359 return if ($verstep & 0xf0) != 0x60; 4346 4360 4347 4361 if ($vendor == 0x41) # Analog Devices … … 4349 4363 return if i2c_smbus_read_byte_data($file, 0x3d) != 0x27; 4350 4364 return (8); 4365 } 4366 4367 if ($vendor == 0x5c) # SMSC 4368 { 4369 # Return undef if this is a SCH5027 4370 return if $verstep >= 0x69 and 4371 i2c_smbus_read_byte_data($file, 0xba) == 0x0f; 4351 4372 } 4352 4373 … … 5167 5188 } 5168 5189 5169 # $_[0]: A reference to the file descriptor to access this chip. 5170 # $_[1]: Address 5190 # $_[0]: Chip to detect 5191 # (1 = DME1737, 2 = SCH5027) 5192 # $_[1]: A reference to the file descriptor to access this chip. 5193 # $_[2]: Address 5171 5194 # Returns: undef if not detected, 5 or 6 if detected. 5172 5195 # Registers used: … … 5175 5198 # 0x73: Read-only test register (4 test bits) 5176 5199 # 0x8A: Read-only test register (7 test bits) 5200 # 0xBA: Read-only test register (8 test bits) 5177 5201 sub dme1737_detect 5178 5202 { 5179 my ($file, $addr) = @_; 5180 return unless i2c_smbus_read_byte_data($file, 0x3E) == 0x5c 5181 and (i2c_smbus_read_byte_data($file, 0x3F) & 0xF8) == 0x88 5182 and (i2c_smbus_read_byte_data($file, 0x73) & 0x0F) == 0x09 5183 and (i2c_smbus_read_byte_data($file, 0x8A) & 0x7F) == 0x4D; 5203 my ($chip, $file, $addr) = @_; 5204 my $vendor = i2c_smbus_read_byte_data($file, 0x3E); 5205 my $verstep = i2c_smbus_read_byte_data($file, 0x3F); 5206 5207 return unless $vendor == 0x5C; # SMSC 5208 5209 if ($chip == 1) { # DME1737 5210 return unless ($verstep & 0xF8) == 0x88 and 5211 (i2c_smbus_read_byte_data($file, 0x73) & 0x0F) == 0x09 and 5212 (i2c_smbus_read_byte_data($file, 0x8A) & 0x7F) == 0x4D; 5213 } elsif ($chip == 2) { # SCH5027 5214 return unless $verstep >= 0x69 and $verstep <= 0x6F and 5215 i2c_smbus_read_byte_data($file, 0xBA) == 0x0F; 5216 } 5217 5184 5218 return ($addr == 0x2e ? 6 : 5); 5185 5219 }
