summaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm90.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/lm90.c')
-rw-r--r--drivers/hwmon/lm90.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 7fef2a1194d..7c6a3df36d8 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -1283,8 +1283,19 @@ static int lm90_detect(struct i2c_client *new_client,
}
}
} else
- if (man_id == 0xA1) { /* NXP Semiconductor/Philips */
- if (chip_id == 0x00 && address >= 0x48 && address <= 0x4F) {
+ if (address >= 0x48 && address <= 0x4F
+ && man_id == 0xA1) { /* NXP Semiconductor/Philips */
+ int reg_config2;
+
+ reg_config2 = i2c_smbus_read_byte_data(new_client,
+ LM90_REG_R_CONFIG2);
+ if (reg_config2 < 0)
+ return -ENODEV;
+
+ if (chip_id == 0x00
+ && (reg_config1 & 0x2A) == 0x00
+ && (reg_config2 & 0xFE) == 0x00
+ && reg_convrate <= 0x09) {
name = "sa56004";
}
}