diff options
author | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-04-29 10:33:35 -0400 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2011-04-29 10:33:35 -0400 |
commit | 5a4e5e6a701bea7d3cbeed19fa9ea45802e8fabb (patch) | |
tree | 721d052e593c2d15fdda6d10a9e293f4f7525857 | |
parent | fafc9929c668f8bae6dd1f109f33a86d2cb3c460 (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>
-rw-r--r-- | Documentation/hwmon/lm90 | 23 | ||||
-rw-r--r-- | drivers/hwmon/Kconfig | 8 | ||||
-rw-r--r-- | drivers/hwmon/lm90.c | 22 |
3 files changed, 36 insertions, 17 deletions
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90 index fa475c0a48a3..aa820aca7953 100644 --- a/Documentation/hwmon/lm90 +++ b/Documentation/hwmon/lm90 | |||
@@ -32,6 +32,16 @@ Supported chips: | |||
32 | Addresses scanned: I2C 0x4c and 0x4d | 32 | Addresses scanned: I2C 0x4c and 0x4d |
33 | Datasheet: Publicly available at the ON Semiconductor website | 33 | Datasheet: Publicly available at the ON Semiconductor website |
34 | http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461 | 34 | http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461 |
35 | * Analog Devices ADT7461A | ||
36 | Prefix: 'adt7461a' | ||
37 | Addresses scanned: I2C 0x4c and 0x4d | ||
38 | Datasheet: Publicly available at the ON Semiconductor website | ||
39 | http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A | ||
40 | * ON Semiconductor NCT1008 | ||
41 | Prefix: 'nct1008' | ||
42 | Addresses scanned: I2C 0x4c and 0x4d | ||
43 | Datasheet: Publicly available at the ON Semiconductor website | ||
44 | http://www.onsemi.com/PowerSolutions/product.do?id=NCT1008 | ||
35 | * Maxim MAX6646 | 45 | * Maxim MAX6646 |
36 | Prefix: 'max6646' | 46 | Prefix: 'max6646' |
37 | Addresses scanned: I2C 0x4d | 47 | Addresses scanned: I2C 0x4d |
@@ -149,7 +159,7 @@ ADM1032: | |||
149 | * ALERT is triggered by open remote sensor. | 159 | * ALERT is triggered by open remote sensor. |
150 | * SMBus PEC support for Write Byte and Receive Byte transactions. | 160 | * SMBus PEC support for Write Byte and Receive Byte transactions. |
151 | 161 | ||
152 | ADT7461: | 162 | ADT7461, ADT7461A, NCT1008: |
153 | * Extended temperature range (breaks compatibility) | 163 | * Extended temperature range (breaks compatibility) |
154 | * Lower resolution for remote temperature | 164 | * Lower resolution for remote temperature |
155 | 165 | ||
@@ -205,11 +215,12 @@ SMBus Alert Support | |||
205 | This driver has basic support for SMBus alert. When an alert is received, | 215 | This driver has basic support for SMBus alert. When an alert is received, |
206 | the status register is read and the faulty temperature channel is logged. | 216 | the status register is read and the faulty temperature channel is logged. |
207 | 217 | ||
208 | The Analog Devices chips (ADM1032 and ADT7461) do not implement the SMBus | 218 | The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON |
209 | alert protocol properly so additional care is needed: the ALERT output is | 219 | Semiconductor chips (NCT1008) do not implement the SMBus alert protocol |
210 | disabled when an alert is received, and is re-enabled only when the alarm | 220 | properly so additional care is needed: the ALERT output is disabled when |
211 | is gone. Otherwise the chip would block alerts from other chips in the bus | 221 | an alert is received, and is re-enabled only when the alarm is gone. |
212 | as long as the alarm is active. | 222 | Otherwise the chip would block alerts from other chips in the bus as long |
223 | as the alarm is active. | ||
213 | 224 | ||
214 | PEC Support | 225 | PEC Support |
215 | ----------- | 226 | ----------- |
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, | |||
174 | static const struct i2c_device_id lm90_id[] = { | 175 | static 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 */ |