diff --git a/kernel/chips/adm1021.c b/kernel/chips/adm1021.c index f7f0679a..7d829991 100644 --- a/kernel/chips/adm1021.c +++ b/kernel/chips/adm1021.c @@ -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; } diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index e505af8f..32330ba4 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -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;