diff options
author | Guenter Roeck <linux@roeck-us.net> | 2021-12-21 02:02:36 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2022-07-13 17:38:17 +0200 |
commit | d277fbd53d9d0cd6fc35a8d9003b2e2176fb4948 (patch) | |
tree | cf90bdb2581622622119b3364c035f9769d7e091 /drivers/hwmon/lm90.c | |
parent | hwmon: (lm90) Rework detect function (diff) | |
download | linux-d277fbd53d9d0cd6fc35a8d9003b2e2176fb4948.tar.xz linux-d277fbd53d9d0cd6fc35a8d9003b2e2176fb4948.zip |
hwmon: (lm90) Add support for additional chip revision of NCT1008
The NCT1008 datasheet, Revision 3, states that its chip revision is
0x57. This matches the ADT7461A chip revision, and NCT1008 is therefore
detected as ADT7461A. In revision 6 of the datasheet, the chip revision
register is no longer documented. Multiple samples of NCT1008 were found
to report a chip revision of 0x54. As it turns out, one of the patches
submitted to add NCT1008 support to the lm90 driver already included a
check for chip revision 0x54. Unfortunately, that patch never made it into
the kernel. Remedy the situation and explicitly detect chips with revision
0x54 as NCT1008.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm90.c')
-rw-r--r-- | drivers/hwmon/lm90.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index efeb6bc0f76d..c3ccf1fb2758 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -1558,7 +1558,12 @@ static const char *lm90_detect_analog(struct i2c_client *client, int chip_id, convrate <= 0x0a) name = "adt7461"; break; - case 0x57: /* ADT7461A, NCT1008 */ + case 0x54: /* NCT1008 */ + if ((address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && + convrate <= 0x0a) + name = "nct1008"; + break; + case 0x57: /* ADT7461A, NCT1008 (datasheet rev. 3) */ if ((address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && convrate <= 0x0a) name = "adt7461a"; |