2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

Add detection of LM95234

This commit is contained in:
Guenter Roeck
2013-03-17 16:03:51 +00:00
parent d5ffa33d39
commit f3c0b42ed9
2 changed files with 17 additions and 1 deletions

View File

@@ -1032,6 +1032,11 @@ use vars qw(@i2c_adapter_names);
driver => "lm95241",
i2c_addrs => [0x2b, 0x19, 0x2a],
i2c_detect => sub { lm95231_detect(@_, 0); },
}, {
name => "National Semiconductor LM95234",
driver => "to-be-written", # lm95234
i2c_addrs => [0x18, 0x4d, 0x4e],
i2c_detect => sub { lm95231_detect(@_, 3); },
}, {
name => "National Semiconductor LM95241",
driver => "lm95241",
@@ -4721,14 +4726,17 @@ sub max6657_detect
return 5;
}
# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245, 3 = LM95234
# Registers used:
# 0x02: Status (3 unused bits)
# 0x03: Configuration (3 unused bits)
# 0x04: Conversion rate (6 unused bits, LM95234)
# 0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241)
# 0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241)
# 0x30: Local Temperature LSB (5 unused bits, LM95245)
# 0x30: Diode model (4 unused bits, LM95234)
# 0x33: Status register 2 (6 unused bits, LM95245)
# 0x38: Diode model status (4 unused bits, LM95234)
# 0xfe: Manufacturer ID
# 0xff: Revision ID
sub lm95231_detect
@@ -4752,6 +4760,13 @@ sub lm95231_detect
return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1;
return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f;
return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f;
} elsif ($chip == 3) {
return if $cid != 0x79; # LM95234
return if i2c_smbus_read_byte_data($file, 0x02) & 0x30;
return if i2c_smbus_read_byte_data($file, 0x03) & 0xbc;
return if i2c_smbus_read_byte_data($file, 0x04) & 0xfc;
return if i2c_smbus_read_byte_data($file, 0x30) & 0xe1;
return if i2c_smbus_read_byte_data($file, 0x38) & 0xe1;
}
return 6;