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

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
hwmon: (lm85) extend to support EMC6D103 chips
MAINTAINERS: Remove stale hwmon quilt tree
hwmon: (k10temp) add support for AMD Family 12h/14h CPUs
hwmon: (jc42) do not allow writing to locked registers
hwmon: (jc42) more helpful documentation
hwmon: (jc42) fix type mismatch

+86 -26
+15 -6
Documentation/hwmon/jc42
··· 51 51 * JEDEC JC 42.4 compliant temperature sensor chips 52 52 Prefix: 'jc42' 53 53 Addresses scanned: I2C 0x18 - 0x1f 54 - Datasheet: - 54 + Datasheet: 55 + http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf 55 56 56 57 Author: 57 58 Guenter Roeck <guenter.roeck@ericsson.com> ··· 61 60 Description 62 61 ----------- 63 62 64 - This driver implements support for JEDEC JC 42.4 compliant temperature sensors. 63 + This driver implements support for JEDEC JC 42.4 compliant temperature sensors, 64 + which are used on many DDR3 memory modules for mobile devices and servers. Some 65 + systems use the sensor to prevent memory overheating by automatically throttling 66 + the memory controller. 67 + 65 68 The driver auto-detects the chips listed above, but can be manually instantiated 66 69 to support other JC 42.4 compliant chips. 67 70 ··· 86 81 which applies to all limits. This register can be written by writing into 87 82 temp1_crit_hyst. Other hysteresis attributes are read-only. 88 83 84 + If the BIOS has configured the sensor for automatic temperature management, it 85 + is likely that it has locked the registers, i.e., that the temperature limits 86 + cannot be changed. 87 + 89 88 Sysfs entries 90 89 ------------- 91 90 92 91 temp1_input Temperature (RO) 93 - temp1_min Minimum temperature (RW) 94 - temp1_max Maximum temperature (RW) 95 - temp1_crit Critical high temperature (RW) 92 + temp1_min Minimum temperature (RO or RW) 93 + temp1_max Maximum temperature (RO or RW) 94 + temp1_crit Critical high temperature (RO or RW) 96 95 97 - temp1_crit_hyst Critical hysteresis temperature (RW) 96 + temp1_crit_hyst Critical hysteresis temperature (RO or RW) 98 97 temp1_max_hyst Maximum hysteresis temperature (RO) 99 98 100 99 temp1_min_alarm Temperature low alarm
+7 -1
Documentation/hwmon/k10temp
··· 9 9 Socket S1G3: Athlon II, Sempron, Turion II 10 10 * AMD Family 11h processors: 11 11 Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) 12 + * AMD Family 12h processors: "Llano" 13 + * AMD Family 14h processors: "Brazos" (C/E/G-Series) 12 14 13 15 Prefix: 'k10temp' 14 16 Addresses scanned: PCI space ··· 19 17 http://support.amd.com/us/Processor_TechDocs/31116.pdf 20 18 BIOS and Kernel Developer's Guide (BKDG) for AMD Family 11h Processors: 21 19 http://support.amd.com/us/Processor_TechDocs/41256.pdf 20 + BIOS and Kernel Developer's Guide (BKDG) for AMD Family 14h Models 00h-0Fh Processors: 21 + http://support.amd.com/us/Processor_TechDocs/43170.pdf 22 22 Revision Guide for AMD Family 10h Processors: 23 23 http://support.amd.com/us/Processor_TechDocs/41322.pdf 24 24 Revision Guide for AMD Family 11h Processors: 25 25 http://support.amd.com/us/Processor_TechDocs/41788.pdf 26 + Revision Guide for AMD Family 14h Models 00h-0Fh Processors: 27 + http://support.amd.com/us/Processor_TechDocs/47534.pdf 26 28 AMD Family 11h Processor Power and Thermal Data Sheet for Notebooks: 27 29 http://support.amd.com/us/Processor_TechDocs/43373.pdf 28 30 AMD Family 10h Server and Workstation Processor Power and Thermal Data Sheet: ··· 40 34 ----------- 41 35 42 36 This driver permits reading of the internal temperature sensor of AMD 43 - Family 10h and 11h processors. 37 + Family 10h/11h/12h/14h processors. 44 38 45 39 All these processors have a sensor, but on those for Socket F or AM2+, 46 40 the sensor may return inconsistent values (erratum 319). The driver
-1
MAINTAINERS
··· 2873 2873 L: lm-sensors@lm-sensors.org 2874 2874 W: http://www.lm-sensors.org/ 2875 2875 T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-hwmon/ 2876 - T: quilt kernel.org/pub/linux/kernel/people/groeck/linux-staging/ 2877 2876 T: git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 2878 2877 S: Maintained 2879 2878 F: Documentation/hwmon/
+10 -9
drivers/hwmon/Kconfig
··· 238 238 will be called k8temp. 239 239 240 240 config SENSORS_K10TEMP 241 - tristate "AMD Phenom/Sempron/Turion/Opteron temperature sensor" 241 + tristate "AMD Family 10h/11h/12h/14h temperature sensor" 242 242 depends on X86 && PCI 243 243 help 244 244 If you say yes here you get support for the temperature 245 245 sensor(s) inside your CPU. Supported are later revisions of 246 - the AMD Family 10h and all revisions of the AMD Family 11h 247 - microarchitectures. 246 + the AMD Family 10h and all revisions of the AMD Family 11h, 247 + 12h (Llano), and 14h (Brazos) microarchitectures. 248 248 249 249 This driver can also be built as a module. If so, the module 250 250 will be called k10temp. ··· 455 455 called jz4740-hwmon. 456 456 457 457 config SENSORS_JC42 458 - tristate "JEDEC JC42.4 compliant temperature sensors" 458 + tristate "JEDEC JC42.4 compliant memory module temperature sensors" 459 459 depends on I2C 460 460 help 461 - If you say yes here you get support for Jedec JC42.4 compliant 462 - temperature sensors. Support will include, but not be limited to, 463 - ADT7408, CAT34TS02,, CAT6095, MAX6604, MCP9805, MCP98242, MCP98243, 464 - MCP9843, SE97, SE98, STTS424, TSE2002B3, and TS3000B3. 461 + If you say yes here, you get support for JEDEC JC42.4 compliant 462 + temperature sensors, which are used on many DDR3 memory modules for 463 + mobile devices and servers. Support will include, but not be limited 464 + to, ADT7408, CAT34TS02, CAT6095, MAX6604, MCP9805, MCP98242, MCP98243, 465 + MCP9843, SE97, SE98, STTS424(E), TSE2002B3, and TS3000B3. 465 466 466 467 This driver can also be built as a module. If so, the module 467 468 will be called jc42. ··· 575 574 help 576 575 If you say yes here you get support for National Semiconductor LM85 577 576 sensor chips and clones: ADM1027, ADT7463, ADT7468, EMC6D100, 578 - EMC6D101 and EMC6D102. 577 + EMC6D101, EMC6D102, and EMC6D103. 579 578 580 579 This driver can also be built as a module. If so, the module 581 580 will be called lm85.
+30 -5
drivers/hwmon/jc42.c
··· 53 53 54 54 /* Configuration register defines */ 55 55 #define JC42_CFG_CRIT_ONLY (1 << 2) 56 + #define JC42_CFG_TCRIT_LOCK (1 << 6) 57 + #define JC42_CFG_EVENT_LOCK (1 << 7) 56 58 #define JC42_CFG_SHUTDOWN (1 << 8) 57 59 #define JC42_CFG_HYST_SHIFT 9 58 60 #define JC42_CFG_HYST_MASK 0x03 ··· 334 332 { 335 333 struct i2c_client *client = to_i2c_client(dev); 336 334 struct jc42_data *data = i2c_get_clientdata(client); 337 - long val; 335 + unsigned long val; 338 336 int diff, hyst; 339 337 int err; 340 338 int ret = count; ··· 382 380 383 381 static DEVICE_ATTR(temp1_input, S_IRUGO, 384 382 show_temp_input, NULL); 385 - static DEVICE_ATTR(temp1_crit, S_IWUSR | S_IRUGO, 383 + static DEVICE_ATTR(temp1_crit, S_IRUGO, 386 384 show_temp_crit, set_temp_crit); 387 - static DEVICE_ATTR(temp1_min, S_IWUSR | S_IRUGO, 385 + static DEVICE_ATTR(temp1_min, S_IRUGO, 388 386 show_temp_min, set_temp_min); 389 - static DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO, 387 + static DEVICE_ATTR(temp1_max, S_IRUGO, 390 388 show_temp_max, set_temp_max); 391 389 392 - static DEVICE_ATTR(temp1_crit_hyst, S_IWUSR | S_IRUGO, 390 + static DEVICE_ATTR(temp1_crit_hyst, S_IRUGO, 393 391 show_temp_crit_hyst, set_temp_crit_hyst); 394 392 static DEVICE_ATTR(temp1_max_hyst, S_IRUGO, 395 393 show_temp_max_hyst, NULL); ··· 414 412 NULL 415 413 }; 416 414 415 + static mode_t jc42_attribute_mode(struct kobject *kobj, 416 + struct attribute *attr, int index) 417 + { 418 + struct device *dev = container_of(kobj, struct device, kobj); 419 + struct i2c_client *client = to_i2c_client(dev); 420 + struct jc42_data *data = i2c_get_clientdata(client); 421 + unsigned int config = data->config; 422 + bool readonly; 423 + 424 + if (attr == &dev_attr_temp1_crit.attr) 425 + readonly = config & JC42_CFG_TCRIT_LOCK; 426 + else if (attr == &dev_attr_temp1_min.attr || 427 + attr == &dev_attr_temp1_max.attr) 428 + readonly = config & JC42_CFG_EVENT_LOCK; 429 + else if (attr == &dev_attr_temp1_crit_hyst.attr) 430 + readonly = config & (JC42_CFG_EVENT_LOCK | JC42_CFG_TCRIT_LOCK); 431 + else 432 + readonly = true; 433 + 434 + return S_IRUGO | (readonly ? 0 : S_IWUSR); 435 + } 436 + 417 437 static const struct attribute_group jc42_group = { 418 438 .attrs = jc42_attributes, 439 + .is_visible = jc42_attribute_mode, 419 440 }; 420 441 421 442 /* Return 0 if detection is successful, -ENODEV otherwise */
+3 -2
drivers/hwmon/k10temp.c
··· 1 1 /* 2 - * k10temp.c - AMD Family 10h/11h processor hardware monitoring 2 + * k10temp.c - AMD Family 10h/11h/12h/14h processor hardware monitoring 3 3 * 4 4 * Copyright (c) 2009 Clemens Ladisch <clemens@ladisch.de> 5 5 * ··· 25 25 #include <linux/pci.h> 26 26 #include <asm/processor.h> 27 27 28 - MODULE_DESCRIPTION("AMD Family 10h/11h CPU core temperature monitor"); 28 + MODULE_DESCRIPTION("AMD Family 10h/11h/12h/14h CPU core temperature monitor"); 29 29 MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>"); 30 30 MODULE_LICENSE("GPL"); 31 31 ··· 208 208 static const struct pci_device_id k10temp_id_table[] = { 209 209 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) }, 210 210 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_11H_NB_MISC) }, 211 + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, 211 212 {} 212 213 }; 213 214 MODULE_DEVICE_TABLE(pci, k10temp_id_table);
+21 -2
drivers/hwmon/lm85.c
··· 41 41 enum chips { 42 42 any_chip, lm85b, lm85c, 43 43 adm1027, adt7463, adt7468, 44 - emc6d100, emc6d102 44 + emc6d100, emc6d102, emc6d103 45 45 }; 46 46 47 47 /* The LM85 registers */ ··· 90 90 #define LM85_VERSTEP_EMC6D100_A0 0x60 91 91 #define LM85_VERSTEP_EMC6D100_A1 0x61 92 92 #define LM85_VERSTEP_EMC6D102 0x65 93 + #define LM85_VERSTEP_EMC6D103_A0 0x68 94 + #define LM85_VERSTEP_EMC6D103_A1 0x69 95 + #define LM85_VERSTEP_EMC6D103S 0x6A /* Also known as EMC6D103:A2 */ 93 96 94 97 #define LM85_REG_CONFIG 0x40 95 98 ··· 351 348 { "emc6d100", emc6d100 }, 352 349 { "emc6d101", emc6d100 }, 353 350 { "emc6d102", emc6d102 }, 351 + { "emc6d103", emc6d103 }, 354 352 { } 355 353 }; 356 354 MODULE_DEVICE_TABLE(i2c, lm85_id); ··· 1254 1250 case LM85_VERSTEP_EMC6D102: 1255 1251 type_name = "emc6d102"; 1256 1252 break; 1253 + case LM85_VERSTEP_EMC6D103_A0: 1254 + case LM85_VERSTEP_EMC6D103_A1: 1255 + type_name = "emc6d103"; 1256 + break; 1257 + /* 1258 + * Registers apparently missing in EMC6D103S/EMC6D103:A2 1259 + * compared to EMC6D103:A0, EMC6D103:A1, and EMC6D102 1260 + * (according to the data sheets), but used unconditionally 1261 + * in the driver: 62[5:7], 6D[0:7], and 6E[0:7]. 1262 + * So skip EMC6D103S for now. 1263 + case LM85_VERSTEP_EMC6D103S: 1264 + type_name = "emc6d103s"; 1265 + break; 1266 + */ 1257 1267 } 1258 1268 } else { 1259 1269 dev_dbg(&adapter->dev, ··· 1301 1283 case adt7468: 1302 1284 case emc6d100: 1303 1285 case emc6d102: 1286 + case emc6d103: 1304 1287 data->freq_map = adm1027_freq_map; 1305 1288 break; 1306 1289 default: ··· 1487 1468 /* More alarm bits */ 1488 1469 data->alarms |= lm85_read_value(client, 1489 1470 EMC6D100_REG_ALARM3) << 16; 1490 - } else if (data->type == emc6d102) { 1471 + } else if (data->type == emc6d102 || data->type == emc6d103) { 1491 1472 /* Have to read LSB bits after the MSB ones because 1492 1473 the reading of the MSB bits has frozen the 1493 1474 LSBs (backward from the ADM1027).