mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-11 16:40:16 +00:00
(mds) fix LM84 detection. Mfr ID in different place than the other chips.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@604 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
d5f72aebac
commit
d23580c058
2 files changed
+7
-4
No files matched your search
@@ -51,7 +51,7 @@ SENSORS_INSMOD_6(adm1021,max1617,max1617a,thmc10,lm84,gl523sm);
|
||||
#define ADM1021_REG_TEMP 0x00
|
||||
#define ADM1021_REG_REMOTE_TEMP 0x01
|
||||
#define ADM1021_REG_STATUS 0x02
|
||||
#define ADM1021_REG_MAN_ID 0x0FE /* 0x41 = AMD, 0x49 = TI, 0x4D = Maxim */
|
||||
#define ADM1021_REG_MAN_ID 0x0FE /* 0x41 = AMD, 0x49 = TI, 0x4D = Maxim, 0x23 = Genesys */
|
||||
#define ADM1021_REG_DEV_ID 0x0FF /* ADM1021 */
|
||||
#define ADM1021_REG_DIE_CODE 0x0FF /* MAX1617A */
|
||||
/* These use different addresses for reading/writing */
|
||||
@@ -248,13 +248,14 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address,
|
||||
kind = adm1021;
|
||||
else if (i == 0x49)
|
||||
kind = thmc10;
|
||||
else if (i == 0x00)
|
||||
kind = lm84;
|
||||
else if (i == 0x23)
|
||||
kind = gl523sm;
|
||||
else if ((i== 0x4d) &&
|
||||
(adm1021_read_value(new_client,ADM1021_REG_DEV_ID) == 0x01))
|
||||
kind = max1617a;
|
||||
/* LM84 Mfr ID in a different place */
|
||||
else if (adm1021_read_value(new_client,ADM1021_REG_CONV_RATE_R) == 0x00)
|
||||
kind = lm84;
|
||||
else
|
||||
kind = max1617;
|
||||
}
|
||||
|
||||
@@ -1438,7 +1438,9 @@ sub adm1022_detect
|
||||
# $_[2]: Address
|
||||
# Returns: undef if not detected, (6) or (3) if detected.
|
||||
# Registers used:
|
||||
# 0x04: Company ID (LM84 only)
|
||||
# 0xfe: Company ID
|
||||
# 0xff: Revision (Maxim only)
|
||||
# 0x02: Status
|
||||
# Note: Especially the Maxim has very bad detection; we give it a low
|
||||
# confidence value.
|
||||
@@ -1448,7 +1450,7 @@ sub adm1021_detect
|
||||
my ($chip, $file,$addr) = @_;
|
||||
return if $chip == 0 and i2c_smbus_read_byte_data($file,0xfe) != 0x41;
|
||||
return if $chip == 3 and i2c_smbus_read_byte_data($file,0xfe) != 0x49;
|
||||
return if $chip == 4 and i2c_smbus_read_byte_data($file,0xfe) != 0x00;
|
||||
return if $chip == 4 and i2c_smbus_read_byte_data($file,0x04) != 0x00;
|
||||
return if $chip == 5 and i2c_smbus_read_byte_data($file,0xfe) != 0x23;
|
||||
return if $chip == 2 and i2c_smbus_read_byte_data($file,0xfe) != 0x4d and
|
||||
i2c_smbus_read_byte_data($file,0xff) != 0x01;
|
||||
|
||||
Reference in new issue
Block a user