diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-03-29 20:56:07 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-04-08 00:16:42 -0400 |
commit | 4ce5b1fe317b4c5e4e3c8b977b95c00182179352 (patch) | |
tree | 8c5463f70c8c03956e11b75fe029830146ddbd83 /drivers/hwmon/tmp401.c | |
parent | e1eb49063b301fd885fca63e2f24d1dac1d65d0e (diff) |
hwmon: (tmp401) Fix device detection for TMP411B and TMP411C
Turns out that TMP411B and TMP411C have different and unique device IDs.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/tmp401.c')
-rw-r--r-- | drivers/hwmon/tmp401.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c index f4290ec7d9e7..be71a3e17cca 100644 --- a/drivers/hwmon/tmp401.c +++ b/drivers/hwmon/tmp401.c | |||
@@ -89,7 +89,9 @@ static const u8 TMP411_TEMP_HIGHEST_LSB[2] = { 0x33, 0x37 }; | |||
89 | /* Manufacturer / Device ID's */ | 89 | /* Manufacturer / Device ID's */ |
90 | #define TMP401_MANUFACTURER_ID 0x55 | 90 | #define TMP401_MANUFACTURER_ID 0x55 |
91 | #define TMP401_DEVICE_ID 0x11 | 91 | #define TMP401_DEVICE_ID 0x11 |
92 | #define TMP411_DEVICE_ID 0x12 | 92 | #define TMP411A_DEVICE_ID 0x12 |
93 | #define TMP411B_DEVICE_ID 0x13 | ||
94 | #define TMP411C_DEVICE_ID 0x10 | ||
93 | #define TMP431_DEVICE_ID 0x31 | 95 | #define TMP431_DEVICE_ID 0x31 |
94 | 96 | ||
95 | /* | 97 | /* |
@@ -561,7 +563,19 @@ static int tmp401_detect(struct i2c_client *client, | |||
561 | return -ENODEV; | 563 | return -ENODEV; |
562 | kind = tmp401; | 564 | kind = tmp401; |
563 | break; | 565 | break; |
564 | case TMP411_DEVICE_ID: | 566 | case TMP411A_DEVICE_ID: |
567 | if (client->addr != 0x4c) | ||
568 | return -ENODEV; | ||
569 | kind = tmp411; | ||
570 | break; | ||
571 | case TMP411B_DEVICE_ID: | ||
572 | if (client->addr != 0x4d) | ||
573 | return -ENODEV; | ||
574 | kind = tmp411; | ||
575 | break; | ||
576 | case TMP411C_DEVICE_ID: | ||
577 | if (client->addr != 0x4e) | ||
578 | return -ENODEV; | ||
565 | kind = tmp411; | 579 | kind = tmp411; |
566 | break; | 580 | break; |
567 | case TMP431_DEVICE_ID: | 581 | case TMP431_DEVICE_ID: |