aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-04-29 10:33:35 -0400
committerJean Delvare <khali@endymion.delvare>2011-04-29 10:33:35 -0400
commit5a4e5e6a701bea7d3cbeed19fa9ea45802e8fabb (patch)
tree721d052e593c2d15fdda6d10a9e293f4f7525857 /drivers/hwmon
parentfafc9929c668f8bae6dd1f109f33a86d2cb3c460 (diff)
hwmon: (lm90) Add support for ADT7461A and NCT1008
This patch adds support for ADT7461A and NCT1008 to the lm90 driver. Both chips have identical functionality and report the same manufacturing ID and device ID values. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/Kconfig8
-rw-r--r--drivers/hwmon/lm90.c22
2 files changed, 19 insertions, 11 deletions
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 060ef6327876..92d02512bcde 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -618,10 +618,10 @@ config SENSORS_LM90
618 depends on I2C 618 depends on I2C
619 help 619 help
620 If you say yes here you get support for National Semiconductor LM90, 620 If you say yes here you get support for National Semiconductor LM90,
621 LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, Maxim 621 LM86, LM89 and LM99, Analog Devices ADM1032, ADT7461, and ADT7461A,
622 MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659, 622 Maxim MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659,
623 MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, and Winbond/Nuvoton 623 MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, ON Semiconductor NCT1008,
624 W83L771W/G/AWG/ASG sensor chips. 624 and Winbond/Nuvoton W83L771W/G/AWG/ASG sensor chips.
625 625
626 This driver can also be built as a module. If so, the module 626 This driver can also be built as a module. If so, the module
627 will be called lm90. 627 will be called lm90.
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index c43b4e9f96a9..2f94f9504804 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -49,10 +49,10 @@
49 * chips, but support three temperature sensors instead of two. MAX6695 49 * chips, but support three temperature sensors instead of two. MAX6695
50 * and MAX6696 only differ in the pinout so they can be treated identically. 50 * and MAX6696 only differ in the pinout so they can be treated identically.
51 * 51 *
52 * This driver also supports the ADT7461 chip from Analog Devices. 52 * This driver also supports ADT7461 and ADT7461A from Analog Devices as well as
53 * It's supported in both compatibility and extended mode. It is mostly 53 * NCT1008 from ON Semiconductor. The chips are supported in both compatibility
54 * compatible with LM90 except for a data format difference for the 54 * and extended mode. They are mostly compatible with LM90 except for a data
55 * temperature value registers. 55 * format difference for the temperature value registers.
56 * 56 *
57 * Since the LM90 was the first chipset supported by this driver, most 57 * Since the LM90 was the first chipset supported by this driver, most
58 * comments will refer to this chipset, but are actually general and 58 * comments will refer to this chipset, but are actually general and
@@ -88,9 +88,10 @@
88 * Addresses to scan 88 * Addresses to scan
89 * Address is fully defined internally and cannot be changed except for 89 * Address is fully defined internally and cannot be changed except for
90 * MAX6659, MAX6680 and MAX6681. 90 * MAX6659, MAX6680 and MAX6681.
91 * LM86, LM89, LM90, LM99, ADM1032, ADM1032-1, ADT7461, MAX6649, MAX6657, 91 * LM86, LM89, LM90, LM99, ADM1032, ADM1032-1, ADT7461, ADT7461A, MAX6649,
92 * MAX6658 and W83L771 have address 0x4c. 92 * MAX6657, MAX6658, NCT1008 and W83L771 have address 0x4c.
93 * ADM1032-2, ADT7461-2, LM89-1, LM99-1 and MAX6646 have address 0x4d. 93 * ADM1032-2, ADT7461-2, ADT7461A-2, LM89-1, LM99-1, MAX6646, and NCT1008D
94 * have address 0x4d.
94 * MAX6647 has address 0x4e. 95 * MAX6647 has address 0x4e.
95 * MAX6659 can have address 0x4c, 0x4d or 0x4e. 96 * MAX6659 can have address 0x4c, 0x4d or 0x4e.
96 * MAX6680 and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 97 * MAX6680 and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
@@ -174,6 +175,7 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
174static const struct i2c_device_id lm90_id[] = { 175static const struct i2c_device_id lm90_id[] = {
175 { "adm1032", adm1032 }, 176 { "adm1032", adm1032 },
176 { "adt7461", adt7461 }, 177 { "adt7461", adt7461 },
178 { "adt7461a", adt7461 },
177 { "lm90", lm90 }, 179 { "lm90", lm90 },
178 { "lm86", lm86 }, 180 { "lm86", lm86 },
179 { "lm89", lm86 }, 181 { "lm89", lm86 },
@@ -188,6 +190,7 @@ static const struct i2c_device_id lm90_id[] = {
188 { "max6681", max6680 }, 190 { "max6681", max6680 },
189 { "max6695", max6696 }, 191 { "max6695", max6696 },
190 { "max6696", max6696 }, 192 { "max6696", max6696 },
193 { "nct1008", adt7461 },
191 { "w83l771", w83l771 }, 194 { "w83l771", w83l771 },
192 { } 195 { }
193}; 196};
@@ -1153,6 +1156,11 @@ static int lm90_detect(struct i2c_client *new_client,
1153 && (reg_config1 & 0x1B) == 0x00 1156 && (reg_config1 & 0x1B) == 0x00
1154 && reg_convrate <= 0x0A) { 1157 && reg_convrate <= 0x0A) {
1155 name = "adt7461"; 1158 name = "adt7461";
1159 } else
1160 if (chip_id == 0x57 /* ADT7461A, NCT1008 */
1161 && (reg_config1 & 0x1B) == 0x00
1162 && reg_convrate <= 0x0A) {
1163 name = "adt7461a";
1156 } 1164 }
1157 } else 1165 } else
1158 if (man_id == 0x4D) { /* Maxim */ 1166 if (man_id == 0x4D) { /* Maxim */