summaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm90.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2022-01-07 02:07:48 +0300
committerGuenter Roeck <linux@roeck-us.net>2022-07-13 18:38:19 +0300
commitf63f6cce28cd90f7caa68b4a3690896523d142a4 (patch)
tree202352dcfb300e5f40be5de5bd8027b007ad31f2 /drivers/hwmon/lm90.c
parentb1526b38e363bd87840c0e2c22a16e6fd42fea56 (diff)
downloadlinux-f63f6cce28cd90f7caa68b4a3690896523d142a4.tar.xz
hwmon: (lm90) Add explicit support for ADM1020
ADM1020 is compatible with ADM1021 but has a separate chip revision and a limited I2C address range. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm90.c')
-rw-r--r--drivers/hwmon/lm90.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 3f49b2e5e9c4..42f6d9d6677b 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -228,6 +228,7 @@ enum chips { adm1023, adm1032, adt7461, adt7461a, adt7481,
*/
static const struct i2c_device_id lm90_id[] = {
+ { "adm1020", max1617 },
{ "adm1021", max1617 },
{ "adm1023", adm1023 },
{ "adm1032", adm1032 },
@@ -1831,7 +1832,8 @@ static const char *lm90_detect_analog(struct i2c_client *client, bool common_add
(config1 & 0x0b) == 0x08 && convrate <= 0x0a)
name = "adt7421";
break;
- case 0x30 ... 0x3e: /* ADM1021A, ADM1023 */
+ case 0x30 ... 0x38: /* ADM1021A, ADM1023 */
+ case 0x3a ... 0x3e:
/*
* ADM1021A and compatible chips will be mis-detected as
* ADM1023. Chips labeled 'ADM1021A' and 'ADM1023' were both
@@ -1849,6 +1851,12 @@ static const char *lm90_detect_analog(struct i2c_client *client, bool common_add
!(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8))
name = "adm1023";
break;
+ case 0x39: /* ADM1020 (undocumented) */
+ if (man_id2 == 0x00 && chip_id2 == 0x00 &&
+ (address == 0x4c || address == 0x4d || address == 0x4e) &&
+ !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8))
+ name = "adm1020";
+ break;
case 0x3f: /* NCT210 */
if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address &&
!(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8))