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>
This commit is contained in:
parent
e1eb49063b
commit
4ce5b1fe31
1 changed files with 16 additions and 2 deletions
|
@ -89,7 +89,9 @@ static const u8 TMP411_TEMP_HIGHEST_LSB[2] = { 0x33, 0x37 };
|
||||||
/* Manufacturer / Device ID's */
|
/* Manufacturer / Device ID's */
|
||||||
#define TMP401_MANUFACTURER_ID 0x55
|
#define TMP401_MANUFACTURER_ID 0x55
|
||||||
#define TMP401_DEVICE_ID 0x11
|
#define TMP401_DEVICE_ID 0x11
|
||||||
#define TMP411_DEVICE_ID 0x12
|
#define TMP411A_DEVICE_ID 0x12
|
||||||
|
#define TMP411B_DEVICE_ID 0x13
|
||||||
|
#define TMP411C_DEVICE_ID 0x10
|
||||||
#define TMP431_DEVICE_ID 0x31
|
#define TMP431_DEVICE_ID 0x31
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -561,7 +563,19 @@ static int tmp401_detect(struct i2c_client *client,
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
kind = tmp401;
|
kind = tmp401;
|
||||||
break;
|
break;
|
||||||
case TMP411_DEVICE_ID:
|
case TMP411A_DEVICE_ID:
|
||||||
|
if (client->addr != 0x4c)
|
||||||
|
return -ENODEV;
|
||||||
|
kind = tmp411;
|
||||||
|
break;
|
||||||
|
case TMP411B_DEVICE_ID:
|
||||||
|
if (client->addr != 0x4d)
|
||||||
|
return -ENODEV;
|
||||||
|
kind = tmp411;
|
||||||
|
break;
|
||||||
|
case TMP411C_DEVICE_ID:
|
||||||
|
if (client->addr != 0x4e)
|
||||||
|
return -ENODEV;
|
||||||
kind = tmp411;
|
kind = tmp411;
|
||||||
break;
|
break;
|
||||||
case TMP431_DEVICE_ID:
|
case TMP431_DEVICE_ID:
|
||||||
|
|
Loading…
Reference in a new issue