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>
This commit is contained in:
parent
4ad40cc568
commit
907a6d5824
|
@ -20,7 +20,7 @@ Supported chips:
|
||||||
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html
|
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html
|
||||||
* Texas Instruments TMP435
|
* Texas Instruments TMP435
|
||||||
Prefix: 'tmp435'
|
Prefix: 'tmp435'
|
||||||
Addresses scanned: I2C 0x4c
|
Addresses scanned: I2C 0x37, 0x48 - 0x4f
|
||||||
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html
|
Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
|
|
|
@ -44,7 +44,8 @@
|
||||||
#include <linux/sysfs.h>
|
#include <linux/sysfs.h>
|
||||||
|
|
||||||
/* Addresses to scan */
|
/* Addresses to scan */
|
||||||
static const unsigned short normal_i2c[] = { 0x4c, 0x4d, 0x4e, I2C_CLIENT_END };
|
static const unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4c, 0x4d,
|
||||||
|
0x4e, 0x4f, I2C_CLIENT_END };
|
||||||
|
|
||||||
enum chips { tmp401, tmp411, tmp431, tmp432, tmp435 };
|
enum chips { tmp401, tmp411, tmp431, tmp432, tmp435 };
|
||||||
|
|
||||||
|
@ -679,18 +680,16 @@ static int tmp401_detect(struct i2c_client *client,
|
||||||
kind = tmp411;
|
kind = tmp411;
|
||||||
break;
|
break;
|
||||||
case TMP431_DEVICE_ID:
|
case TMP431_DEVICE_ID:
|
||||||
if (client->addr == 0x4e)
|
if (client->addr != 0x4c && client->addr != 0x4d)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
kind = tmp431;
|
kind = tmp431;
|
||||||
break;
|
break;
|
||||||
case TMP432_DEVICE_ID:
|
case TMP432_DEVICE_ID:
|
||||||
if (client->addr == 0x4e)
|
if (client->addr != 0x4c && client->addr != 0x4d)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
kind = tmp432;
|
kind = tmp432;
|
||||||
break;
|
break;
|
||||||
case TMP435_DEVICE_ID:
|
case TMP435_DEVICE_ID:
|
||||||
if (client->addr != 0x4c)
|
|
||||||
return -ENODEV;
|
|
||||||
kind = tmp435;
|
kind = tmp435;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue