diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-12-05 13:15:03 -0500 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2014-12-08 09:48:37 -0500 |
commit | 907a6d5824599d09e986105a5a880d119a996c4b (patch) | |
tree | d2a21c761a31aa62441e1dc8b26491298f45eff4 /drivers/hwmon/tmp401.c | |
parent | 4ad40cc568c5537de11092d3362f9cb287f915d9 (diff) |
hwmon: (tmp401) Detect TMP435 on all addresses it supports
TMP435 supports a range of I2C addresses, not just 0x4c.
Cc: Patrick Titiano <ptitiano@baylibre.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/tmp401.c')
-rw-r--r-- | drivers/hwmon/tmp401.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c index f2182ee80830..99664ebc738d 100644 --- a/drivers/hwmon/tmp401.c +++ b/drivers/hwmon/tmp401.c | |||
@@ -44,7 +44,8 @@ | |||
44 | #include <linux/sysfs.h> | 44 | #include <linux/sysfs.h> |
45 | 45 | ||
46 | /* Addresses to scan */ | 46 | /* Addresses to scan */ |
47 | static const unsigned short normal_i2c[] = { 0x4c, 0x4d, 0x4e, I2C_CLIENT_END }; | 47 | static const unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4c, 0x4d, |
48 | 0x4e, 0x4f, I2C_CLIENT_END }; | ||
48 | 49 | ||
49 | enum chips { tmp401, tmp411, tmp431, tmp432, tmp435 }; | 50 | enum chips { tmp401, tmp411, tmp431, tmp432, tmp435 }; |
50 | 51 | ||
@@ -679,18 +680,16 @@ static int tmp401_detect(struct i2c_client *client, | |||
679 | kind = tmp411; | 680 | kind = tmp411; |
680 | break; | 681 | break; |
681 | case TMP431_DEVICE_ID: | 682 | case TMP431_DEVICE_ID: |
682 | if (client->addr == 0x4e) | 683 | if (client->addr != 0x4c && client->addr != 0x4d) |
683 | return -ENODEV; | 684 | return -ENODEV; |
684 | kind = tmp431; | 685 | kind = tmp431; |
685 | break; | 686 | break; |
686 | case TMP432_DEVICE_ID: | 687 | case TMP432_DEVICE_ID: |
687 | if (client->addr == 0x4e) | 688 | if (client->addr != 0x4c && client->addr != 0x4d) |
688 | return -ENODEV; | 689 | return -ENODEV; |
689 | kind = tmp432; | 690 | kind = tmp432; |
690 | break; | 691 | break; |
691 | case TMP435_DEVICE_ID: | 692 | case TMP435_DEVICE_ID: |
692 | if (client->addr != 0x4c) | ||
693 | return -ENODEV; | ||
694 | kind = tmp435; | 693 | kind = tmp435; |
695 | break; | 694 | break; |
696 | default: | 695 | default: |