Changeset 5261
- Timestamp:
- 05/23/08 12:22:30 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/branches/lm-sensors-3.0.0/CHANGES
r5258 r5261 4 4 SVN-HEAD 5 5 sensors-detect: Add Intel SCH (bus) support 6 Add SMSC EMC6D103 support 6 7 7 8 3.0.2 (2008-05-18) lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect
r5260 r5261 670 670 }, 671 671 { 672 name => "National Semiconductor LM85 or LM96000",672 name => "National Semiconductor LM85", 673 673 driver => "lm85", 674 674 i2c_addrs => [0x2c..0x2e], 675 i2c_detect => sub { lm85_detect(0 x01, @_); },676 }, 677 { 678 name => " Analog Devices ADM1027, ADT7460 or ADT7463",675 i2c_detect => sub { lm85_detect(0, @_); }, 676 }, 677 { 678 name => "National Semiconductor LM96000", 679 679 driver => "lm85", 680 680 i2c_addrs => [0x2c..0x2e], 681 i2c_detect => sub { lm85_detect( 0x41, @_); },682 }, 683 { 684 name => " SMSC EMC6D100, EMC6D101 or EMC6D102",681 i2c_detect => sub { lm85_detect(1, @_); }, 682 }, 683 { 684 name => "Analog Devices ADM1027", 685 685 driver => "lm85", 686 686 i2c_addrs => [0x2c..0x2e], 687 i2c_detect => sub { lm85_detect(0x5c, @_); }, 687 i2c_detect => sub { lm85_detect(2, @_); }, 688 }, 689 { 690 name => "Analog Devices ADT7460 or ADT7463", 691 driver => "lm85", 692 i2c_addrs => [0x2c..0x2e], 693 i2c_detect => sub { lm85_detect(3, @_); }, 694 }, 695 { 696 name => "SMSC EMC6D100 or EMC6D101", 697 driver => "lm85", 698 i2c_addrs => [0x2c..0x2e], 699 i2c_detect => sub { lm85_detect(4, @_); }, 700 }, 701 { 702 name => "SMSC EMC6D102", 703 driver => "lm85", 704 i2c_addrs => [0x2c..0x2e], 705 i2c_detect => sub { lm85_detect(5, @_); }, 706 }, 707 { 708 name => "SMSC EMC6D103", 709 driver => "lm85", 710 i2c_addrs => [0x2c..0x2e], 711 i2c_detect => sub { lm85_detect(6, @_); }, 688 712 }, 689 713 { … … 4331 4355 } 4332 4356 4333 # $_[0]: Vendor to check for 4334 # (0x01 = National Semi, 0x41 = Analog Dev, 0x5c = SMSC) 4357 # $_[0]: Chip to detect 4358 # (0 = LM85, 1 = LM96000, 2 = ADM1027, 3 = ADT7463, 4359 # 4 = EMC6D100/101, 5 = EMC6D102, 6 = EMC6D103) 4335 4360 # $_[1]: A reference to the file descriptor to access this chip. 4336 4361 # #_[2]: Base address. … … 4342 4367 # 0x41 == Analog Devices Vendor Id. 4343 4368 # 0x5c == SMSC Vendor Id. 4344 # 0x60 == Version number. The lower 4 stepping4345 # bits are masked and ignored.4346 4369 sub lm85_detect 4347 4370 { 4348 my ($vendor, $file, $addr) = @_; 4349 return if (i2c_smbus_read_byte_data($file, 0x3e)) != $vendor; 4350 4371 my ($chip, $file, $addr) = @_; 4372 my $vendor = i2c_smbus_read_byte_data($file, 0x3e); 4351 4373 my $verstep = i2c_smbus_read_byte_data($file, 0x3f); 4352 return if ($verstep & 0xf0) != 0x60; 4374 4375 if ($chip == 0) { 4376 return if $vendor != 0x01; # National Semiconductor 4377 return if $verstep != 0x60 # LM85 C 4378 && $verstep != 0x62; # LM85 B 4379 } elsif ($chip == 1) { 4380 return if $vendor != 0x01; # National Semiconductor 4381 return if $verstep != 0x68; # LM96000 4382 } elsif ($chip == 2) { 4383 return if $vendor != 0x41; # Analog Devices 4384 return if $verstep != 0x60; # ADM1027 4385 } elsif ($chip == 3) { 4386 return if $vendor != 0x41; # Analog Devices 4387 return if $verstep != 0x62; # ADT7463 4388 } elsif ($chip == 4) { 4389 return if $vendor != 0x5c; # SMSC 4390 return if $verstep != 0x60 # EMC6D100/101 A0 4391 && $verstep != 0x61; # EMC6D100/101 A1 4392 } elsif ($chip == 5) { 4393 return if $vendor != 0x5c; # SMSC 4394 return if $verstep != 0x65; # EMC6D102 4395 } elsif ($chip == 6) { 4396 return if $vendor != 0x5c; # SMSC 4397 return if $verstep != 0x68; # EMC6D103 4398 } 4353 4399 4354 4400 if ($vendor == 0x41) # Analog Devices … … 4356 4402 return if i2c_smbus_read_byte_data($file, 0x3d) != 0x27; 4357 4403 return (8); 4358 }4359 4360 if ($vendor == 0x5c) # SMSC4361 {4362 # Return undef if this is a SCH50274363 return if $verstep >= 0x69 and4364 i2c_smbus_read_byte_data($file, 0xba) == 0x0f;4365 4404 } 4366 4405
