Changeset 5984 for lm-sensors/trunk/prog/detect
- Timestamp:
- 07/10/11 21:22:53 (11 months ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/prog/detect/sensors-detect (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/prog/detect/sensors-detect
r5983 r5984 1009 1009 i2c_detect => sub { lm95231_detect(@_, 1); }, 1010 1010 }, { 1011 name => "National Semiconductor LM95245", 1012 driver => "lm95245", 1013 i2c_addrs => [0x18, 0x19, 0x29, 0x4c, 0x4d], 1014 i2c_detect => sub { lm95231_detect(@_, 2); }, 1015 }, { 1011 1016 name => "National Semiconductor LM63", 1012 1017 driver => "lm63", … … 4541 4546 } 4542 4547 4543 # Chip to detect: 0 = LM95231, 1 = LM95241 4548 # Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245 4544 4549 # Registers used: 4545 4550 # 0x02: Status (3 unused bits) 4546 4551 # 0x03: Configuration (3 unused bits) 4547 # 0x06: Remote diode filter control (6 unused bits) 4548 # 0x30: Remote diode model type select (6 unused bits) 4552 # 0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241) 4553 # 0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241) 4554 # 0x30: Local Temperature LSB (5 unused bits, LM95245) 4555 # 0x33: Status register 2 (6 unused bits, LM95245) 4549 4556 # 0xfe: Manufacturer ID 4550 4557 # 0xff: Revision ID … … 4556 4563 4557 4564 return if $mid != 0x01; # National Semiconductor 4558 return if $chip == 0 && $cid != 0xa1; # LM95231 4559 return if $chip == 1 && $cid != 0xa4; # LM95241 4560 4561 return if i2c_smbus_read_byte_data($file, 0x02) & 0x70; 4562 return if i2c_smbus_read_byte_data($file, 0x03) & 0x89; 4563 return if i2c_smbus_read_byte_data($file, 0x06) & 0xfa; 4564 return if i2c_smbus_read_byte_data($file, 0x30) & 0xfa; 4565 4566 if ($chip == 0 || $chip == 1) { 4567 return if $chip == 0 && $cid != 0xa1; # LM95231 4568 return if $chip == 1 && $cid != 0xa4; # LM95241 4569 return if i2c_smbus_read_byte_data($file, 0x02) & 0x70; 4570 return if i2c_smbus_read_byte_data($file, 0x03) & 0x89; 4571 return if i2c_smbus_read_byte_data($file, 0x06) & 0xfa; 4572 return if i2c_smbus_read_byte_data($file, 0x30) & 0xfa; 4573 } elsif ($chip == 2) { 4574 return if $cid != 0xb3; # LM95245 4575 return if i2c_smbus_read_byte_data($file, 0x02) & 0x68; 4576 return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1; 4577 return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f; 4578 return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f; 4579 } 4565 4580 4566 4581 return 6;
