Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: (lm85) Fix error paths in probe function
hwmon: (lm85) Add missing list terminators
hwmon: (adm1021) Clarify documentation regarding Xeon processors
hwmon: (lm90) Fix update interval information in driver documentation
hwmon: (lm90) Add support for ADT7461A and NCT1008

+63 -41
+19 -17
Documentation/hwmon/adm1021
··· 14 Prefix: 'gl523sm' 15 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 16 Datasheet: 17 - * Intel Xeon Processor 18 - Prefix: - any other - may require 'force_adm1021' parameter 19 - Addresses scanned: none 20 - Datasheet: Publicly available at Intel website 21 * Maxim MAX1617 22 Prefix: 'max1617' 23 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e ··· 87 ADM1021-clones do faster measurements, but there is really no good reason 88 for that. 89 90 - Xeon support 91 - ------------ 92 93 - Some Xeon processors have real max1617, adm1021, or compatible chips 94 - within them, with two temperature sensors. 95 96 - Other Xeons have chips with only one sensor. 97 98 - If you have a Xeon, and the adm1021 module loads, and both temperatures 99 - appear valid, then things are good. 100 101 - If the adm1021 module doesn't load, you should try this: 102 - modprobe adm1021 force_adm1021=BUS,ADDRESS 103 - ADDRESS can only be 0x18, 0x1a, 0x29, 0x2b, 0x4c, or 0x4e. 104 105 - If you have dual Xeons you may have appear to have two separate 106 - adm1021-compatible chips, or two single-temperature sensors, at distinct 107 - addresses.
··· 14 Prefix: 'gl523sm' 15 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 16 Datasheet: 17 * Maxim MAX1617 18 Prefix: 'max1617' 19 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e ··· 91 ADM1021-clones do faster measurements, but there is really no good reason 92 for that. 93 94 95 + Netburst-based Xeon support 96 + --------------------------- 97 98 + Some Xeon processors based on the Netburst (early Pentium 4, from 2001 to 99 + 2003) microarchitecture had real MAX1617, ADM1021, or compatible chips 100 + within them, with two temperature sensors. Other Xeon processors of this 101 + era (with 400 MHz FSB) had chips with only one temperature sensor. 102 103 + If you have such an old Xeon, and you get two valid temperatures when 104 + loading the adm1021 module, then things are good. 105 106 + If nothing happens when loading the adm1021 module, and you are certain 107 + that your specific Xeon processor model includes compatible sensors, you 108 + will have to explicitly instantiate the sensor chips from user-space. See 109 + method 4 in Documentation/i2c/instantiating-devices. Possible slave 110 + addresses are 0x18, 0x1a, 0x29, 0x2b, 0x4c, or 0x4e. It is likely that 111 + only temp2 will be correct and temp1 will have to be ignored. 112 113 + Previous generations of the Xeon processor (based on Pentium II/III) 114 + didn't have these sensors. Next generations of Xeon processors (533 MHz 115 + FSB and faster) lost them, until the Core-based generation which 116 + introduced integrated digital thermal sensors. These are supported by 117 + the coretemp driver.
+20 -9
Documentation/hwmon/lm90
··· 32 Addresses scanned: I2C 0x4c and 0x4d 33 Datasheet: Publicly available at the ON Semiconductor website 34 http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461 35 * Maxim MAX6646 36 Prefix: 'max6646' 37 Addresses scanned: I2C 0x4d ··· 159 * ALERT is triggered by open remote sensor. 160 * SMBus PEC support for Write Byte and Receive Byte transactions. 161 162 - ADT7461: 163 * Extended temperature range (breaks compatibility) 164 * Lower resolution for remote temperature 165 ··· 205 Only the local hysteresis can be set from user-space, and the same delta 206 applies to the remote hysteresis. 207 208 - The lm90 driver will not update its values more frequently than every 209 - other second; reading them more often will do no harm, but will return 210 - 'old' values. 211 212 SMBus Alert Support 213 ------------------- ··· 215 This driver has basic support for SMBus alert. When an alert is received, 216 the status register is read and the faulty temperature channel is logged. 217 218 - The Analog Devices chips (ADM1032 and ADT7461) do not implement the SMBus 219 - alert protocol properly so additional care is needed: the ALERT output is 220 - disabled when an alert is received, and is re-enabled only when the alarm 221 - is gone. Otherwise the chip would block alerts from other chips in the bus 222 - as long as the alarm is active. 223 224 PEC Support 225 -----------
··· 32 Addresses scanned: I2C 0x4c and 0x4d 33 Datasheet: Publicly available at the ON Semiconductor website 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 45 * Maxim MAX6646 46 Prefix: 'max6646' 47 Addresses scanned: I2C 0x4d ··· 149 * ALERT is triggered by open remote sensor. 150 * SMBus PEC support for Write Byte and Receive Byte transactions. 151 152 + ADT7461, ADT7461A, NCT1008: 153 * Extended temperature range (breaks compatibility) 154 * Lower resolution for remote temperature 155 ··· 195 Only the local hysteresis can be set from user-space, and the same delta 196 applies to the remote hysteresis. 197 198 + The lm90 driver will not update its values more frequently than configured with 199 + the update_interval attribute; reading them more often will do no harm, but will 200 + return 'old' values. 201 202 SMBus Alert Support 203 ------------------- ··· 205 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. 207 208 + The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON 209 + Semiconductor chips (NCT1008) do not implement the SMBus alert protocol 210 + properly so additional care is needed: the ALERT output is disabled when 211 + an alert is received, and is re-enabled only when the alarm is gone. 212 + Otherwise the chip would block alerts from other chips in the bus as long 213 + as the alarm is active. 214 215 PEC Support 216 -----------
+5 -6
drivers/hwmon/Kconfig
··· 110 help 111 If you say yes here you get support for Analog Devices ADM1021 112 and ADM1023 sensor chips and clones: Maxim MAX1617 and MAX1617A, 113 - Genesys Logic GL523SM, National Semiconductor LM84, TI THMC10, 114 - and the XEON processor built-in sensor. 115 116 This driver can also be built as a module. If so, the module 117 will be called adm1021. ··· 617 depends on I2C 618 help 619 If you say yes here you get support for National Semiconductor LM90, 620 - LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, Maxim 621 - MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659, 622 - MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, and Winbond/Nuvoton 623 - W83L771W/G/AWG/ASG sensor chips. 624 625 This driver can also be built as a module. If so, the module 626 will be called lm90.
··· 110 help 111 If you say yes here you get support for Analog Devices ADM1021 112 and ADM1023 sensor chips and clones: Maxim MAX1617 and MAX1617A, 113 + Genesys Logic GL523SM, National Semiconductor LM84 and TI THMC10. 114 115 This driver can also be built as a module. If so, the module 116 will be called adm1021. ··· 618 depends on I2C 619 help 620 If you say yes here you get support for National Semiconductor LM90, 621 + LM86, LM89 and LM99, Analog Devices ADM1032, ADT7461, and ADT7461A, 622 + Maxim MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659, 623 + MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, ON Semiconductor NCT1008, 624 + and Winbond/Nuvoton W83L771W/G/AWG/ASG sensor chips. 625 626 This driver can also be built as a module. If so, the module 627 will be called lm90.
+4 -2
drivers/hwmon/lm85.c
··· 1094 &sensor_dev_attr_pwm1_auto_pwm_minctl.dev_attr.attr, 1095 &sensor_dev_attr_pwm2_auto_pwm_minctl.dev_attr.attr, 1096 &sensor_dev_attr_pwm3_auto_pwm_minctl.dev_attr.attr, 1097 }; 1098 1099 static const struct attribute_group lm85_group_minctl = { ··· 1105 &sensor_dev_attr_temp1_auto_temp_off.dev_attr.attr, 1106 &sensor_dev_attr_temp2_auto_temp_off.dev_attr.attr, 1107 &sensor_dev_attr_temp3_auto_temp_off.dev_attr.attr, 1108 }; 1109 1110 static const struct attribute_group lm85_group_temp_off = { ··· 1331 if (data->type != emc6d103s) { 1332 err = sysfs_create_group(&client->dev.kobj, &lm85_group_minctl); 1333 if (err) 1334 - goto err_kfree; 1335 err = sysfs_create_group(&client->dev.kobj, 1336 &lm85_group_temp_off); 1337 if (err) 1338 - goto err_kfree; 1339 } 1340 1341 /* The ADT7463/68 have an optional VRM 10 mode where pin 21 is used
··· 1094 &sensor_dev_attr_pwm1_auto_pwm_minctl.dev_attr.attr, 1095 &sensor_dev_attr_pwm2_auto_pwm_minctl.dev_attr.attr, 1096 &sensor_dev_attr_pwm3_auto_pwm_minctl.dev_attr.attr, 1097 + NULL 1098 }; 1099 1100 static const struct attribute_group lm85_group_minctl = { ··· 1104 &sensor_dev_attr_temp1_auto_temp_off.dev_attr.attr, 1105 &sensor_dev_attr_temp2_auto_temp_off.dev_attr.attr, 1106 &sensor_dev_attr_temp3_auto_temp_off.dev_attr.attr, 1107 + NULL 1108 }; 1109 1110 static const struct attribute_group lm85_group_temp_off = { ··· 1329 if (data->type != emc6d103s) { 1330 err = sysfs_create_group(&client->dev.kobj, &lm85_group_minctl); 1331 if (err) 1332 + goto err_remove_files; 1333 err = sysfs_create_group(&client->dev.kobj, 1334 &lm85_group_temp_off); 1335 if (err) 1336 + goto err_remove_files; 1337 } 1338 1339 /* The ADT7463/68 have an optional VRM 10 mode where pin 21 is used
+15 -7
drivers/hwmon/lm90.c
··· 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. 51 * 52 - * This driver also supports the ADT7461 chip from Analog Devices. 53 - * It's supported in both compatibility and extended mode. It is mostly 54 - * compatible with LM90 except for a data format difference for the 55 - * temperature value registers. 56 * 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 ··· 88 * Addresses to scan 89 * Address is fully defined internally and cannot be changed except for 90 * MAX6659, MAX6680 and MAX6681. 91 - * LM86, LM89, LM90, LM99, ADM1032, ADM1032-1, ADT7461, MAX6649, MAX6657, 92 - * MAX6658 and W83L771 have address 0x4c. 93 - * ADM1032-2, ADT7461-2, LM89-1, LM99-1 and MAX6646 have address 0x4d. 94 * MAX6647 has address 0x4e. 95 * MAX6659 can have address 0x4c, 0x4d or 0x4e. 96 * MAX6680 and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, ··· 175 static const struct i2c_device_id lm90_id[] = { 176 { "adm1032", adm1032 }, 177 { "adt7461", adt7461 }, 178 { "lm90", lm90 }, 179 { "lm86", lm86 }, 180 { "lm89", lm86 }, ··· 190 { "max6681", max6680 }, 191 { "max6695", max6696 }, 192 { "max6696", max6696 }, 193 { "w83l771", w83l771 }, 194 { } 195 }; ··· 1156 && (reg_config1 & 0x1B) == 0x00 1157 && reg_convrate <= 0x0A) { 1158 name = "adt7461"; 1159 } 1160 } else 1161 if (man_id == 0x4D) { /* Maxim */
··· 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. 51 * 52 + * This driver also supports ADT7461 and ADT7461A from Analog Devices as well as 53 + * NCT1008 from ON Semiconductor. The chips are supported in both compatibility 54 + * and extended mode. They are mostly compatible with LM90 except for a data 55 + * format difference for the temperature value registers. 56 * 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 ··· 88 * Addresses to scan 89 * Address is fully defined internally and cannot be changed except for 90 * MAX6659, MAX6680 and MAX6681. 91 + * LM86, LM89, LM90, LM99, ADM1032, ADM1032-1, ADT7461, ADT7461A, MAX6649, 92 + * MAX6657, MAX6658, NCT1008 and W83L771 have address 0x4c. 93 + * ADM1032-2, ADT7461-2, ADT7461A-2, LM89-1, LM99-1, MAX6646, and NCT1008D 94 + * have address 0x4d. 95 * MAX6647 has address 0x4e. 96 * MAX6659 can have address 0x4c, 0x4d or 0x4e. 97 * MAX6680 and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, ··· 174 static const struct i2c_device_id lm90_id[] = { 175 { "adm1032", adm1032 }, 176 { "adt7461", adt7461 }, 177 + { "adt7461a", adt7461 }, 178 { "lm90", lm90 }, 179 { "lm86", lm86 }, 180 { "lm89", lm86 }, ··· 188 { "max6681", max6680 }, 189 { "max6695", max6696 }, 190 { "max6696", max6696 }, 191 + { "nct1008", adt7461 }, 192 { "w83l771", w83l771 }, 193 { } 194 }; ··· 1153 && (reg_config1 & 0x1B) == 0x00 1154 && reg_convrate <= 0x0A) { 1155 name = "adt7461"; 1156 + } else 1157 + if (chip_id == 0x57 /* ADT7461A, NCT1008 */ 1158 + && (reg_config1 & 0x1B) == 0x00 1159 + && reg_convrate <= 0x0A) { 1160 + name = "adt7461a"; 1161 } 1162 } else 1163 if (man_id == 0x4D) { /* Maxim */