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: Fix autoloading of fschmd on recent Fujitsu machines
hwmon: (coretemp) Properly label the sensors
hwmon: (coretemp) Skip duplicate CPU entries
hwmon: (it87) Fix in7 on IT8720F
hwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions

+60 -12
+30 -2
drivers/hwmon/coretemp.c
··· 53 53 struct mutex update_lock; 54 54 const char *name; 55 55 u32 id; 56 + u16 core_id; 56 57 char valid; /* zero until following fields are valid */ 57 58 unsigned long last_updated; /* in jiffies */ 58 59 int temp; ··· 76 75 if (attr->index == SHOW_NAME) 77 76 ret = sprintf(buf, "%s\n", data->name); 78 77 else /* show label */ 79 - ret = sprintf(buf, "Core %d\n", data->id); 78 + ret = sprintf(buf, "Core %d\n", data->core_id); 80 79 return ret; 81 80 } 82 81 ··· 305 304 } 306 305 307 306 data->id = pdev->id; 307 + #ifdef CONFIG_SMP 308 + data->core_id = c->cpu_core_id; 309 + #endif 308 310 data->name = "coretemp"; 309 311 mutex_init(&data->update_lock); 310 312 ··· 409 405 struct list_head list; 410 406 struct platform_device *pdev; 411 407 unsigned int cpu; 408 + #ifdef CONFIG_SMP 409 + u16 phys_proc_id; 410 + u16 cpu_core_id; 411 + #endif 412 412 }; 413 413 414 414 static LIST_HEAD(pdev_list); ··· 423 415 int err; 424 416 struct platform_device *pdev; 425 417 struct pdev_entry *pdev_entry; 418 + #ifdef CONFIG_SMP 419 + struct cpuinfo_x86 *c = &cpu_data(cpu); 420 + #endif 421 + 422 + mutex_lock(&pdev_list_mutex); 423 + 424 + #ifdef CONFIG_SMP 425 + /* Skip second HT entry of each core */ 426 + list_for_each_entry(pdev_entry, &pdev_list, list) { 427 + if (c->phys_proc_id == pdev_entry->phys_proc_id && 428 + c->cpu_core_id == pdev_entry->cpu_core_id) { 429 + err = 0; /* Not an error */ 430 + goto exit; 431 + } 432 + } 433 + #endif 426 434 427 435 pdev = platform_device_alloc(DRVNAME, cpu); 428 436 if (!pdev) { ··· 462 438 463 439 pdev_entry->pdev = pdev; 464 440 pdev_entry->cpu = cpu; 465 - mutex_lock(&pdev_list_mutex); 441 + #ifdef CONFIG_SMP 442 + pdev_entry->phys_proc_id = c->phys_proc_id; 443 + pdev_entry->cpu_core_id = c->cpu_core_id; 444 + #endif 466 445 list_add_tail(&pdev_entry->list, &pdev_list); 467 446 mutex_unlock(&pdev_list_mutex); 468 447 ··· 476 449 exit_device_put: 477 450 platform_device_put(pdev); 478 451 exit: 452 + mutex_unlock(&pdev_list_mutex); 479 453 return err; 480 454 } 481 455
+22
drivers/hwmon/it87.c
··· 80 80 return inb(VAL); 81 81 } 82 82 83 + static inline void 84 + superio_outb(int reg, int val) 85 + { 86 + outb(reg, REG); 87 + outb(val, VAL); 88 + } 89 + 83 90 static int superio_inw(int reg) 84 91 { 85 92 int val; ··· 1524 1517 sio_data->vid_value = superio_inb(IT87_SIO_VID_REG); 1525 1518 1526 1519 reg = superio_inb(IT87_SIO_PINX2_REG); 1520 + /* 1521 + * The IT8720F has no VIN7 pin, so VCCH should always be 1522 + * routed internally to VIN7 with an internal divider. 1523 + * Curiously, there still is a configuration bit to control 1524 + * this, which means it can be set incorrectly. And even 1525 + * more curiously, many boards out there are improperly 1526 + * configured, even though the IT8720F datasheet claims 1527 + * that the internal routing of VCCH to VIN7 is the default 1528 + * setting. So we force the internal routing in this case. 1529 + */ 1530 + if (sio_data->type == it8720 && !(reg & (1 << 1))) { 1531 + reg |= (1 << 1); 1532 + superio_outb(IT87_SIO_PINX2_REG, reg); 1533 + pr_notice("it87: Routing internal VCCH to in7\n"); 1534 + } 1527 1535 if (reg & (1 << 0)) 1528 1536 pr_info("it87: in3 is VCC (+5V)\n"); 1529 1537 if (reg & (1 << 1))
+6 -4
drivers/hwmon/k8temp.c
··· 180 180 } 181 181 182 182 if ((model >= 0x69) && 183 - !(model == 0xc1 || model == 0x6c || model == 0x7c)) { 183 + !(model == 0xc1 || model == 0x6c || model == 0x7c || 184 + model == 0x6b || model == 0x6f || model == 0x7f)) { 184 185 /* 185 - * RevG desktop CPUs (i.e. no socket S1G1 parts) 186 - * need additional offset, otherwise reported 187 - * temperature is below ambient temperature 186 + * RevG desktop CPUs (i.e. no socket S1G1 or 187 + * ASB1 parts) need additional offset, 188 + * otherwise reported temperature is below 189 + * ambient temperature 188 190 */ 189 191 data->temp_offset = 21000; 190 192 }
+2 -6
drivers/i2c/busses/i2c-i801.c
··· 655 655 /* & ~0x80, ignore enabled/disabled bit */ 656 656 if ((type & ~0x80) != dmi_devices[i].type) 657 657 continue; 658 - if (strcmp(name, dmi_devices[i].name)) 658 + if (strcasecmp(name, dmi_devices[i].name)) 659 659 continue; 660 660 661 661 memset(&info, 0, sizeof(struct i2c_board_info)); ··· 704 704 { 705 705 unsigned char temp; 706 706 int err, i; 707 - #if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE 708 - const char *vendor; 709 - #endif 710 707 711 708 I801_dev = dev; 712 709 i801_features = 0; ··· 805 808 } 806 809 #endif 807 810 #if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE 808 - vendor = dmi_get_system_info(DMI_BOARD_VENDOR); 809 - if (vendor && !strcmp(vendor, "FUJITSU SIEMENS")) 811 + if (dmi_name_in_vendors("FUJITSU")) 810 812 dmi_walk(dmi_check_onboard_devices, &i801_adapter); 811 813 #endif 812 814