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: (asus_atk0110) Fix upper limit readings
hwmon: (smsc47m1) Differentiate between LPC47M233 and LPC47M292

+16 -1
+5 -1
drivers/hwmon/asus_atk0110.c
··· 593 sensor->data = data; 594 sensor->id = flags->integer.value; 595 sensor->limit1 = limit1->integer.value; 596 - sensor->limit2 = limit2->integer.value; 597 598 snprintf(sensor->input_attr_name, ATTR_NAME_SIZE, 599 "%s%d_input", base_name, start + *num);
··· 593 sensor->data = data; 594 sensor->id = flags->integer.value; 595 sensor->limit1 = limit1->integer.value; 596 + if (data->old_interface) 597 + sensor->limit2 = limit2->integer.value; 598 + else 599 + /* The upper limit is expressed as delta from lower limit */ 600 + sensor->limit2 = sensor->limit1 + limit2->integer.value; 601 602 snprintf(sensor->input_attr_name, ATTR_NAME_SIZE, 603 "%s%d_input", base_name, start + *num);
+11
drivers/hwmon/smsc47m1.c
··· 86 #define SUPERIO_REG_ACT 0x30 87 #define SUPERIO_REG_BASE 0x60 88 #define SUPERIO_REG_DEVID 0x20 89 90 /* Logical device registers */ 91 ··· 430 * The LPC47M292 (device id 0x6B) is somewhat compatible, but it 431 * supports a 3rd fan, and the pin configuration registers are 432 * unfortunately different. 433 */ 434 switch (val) { 435 case 0x51: ··· 452 sio_data->type = smsc47m1; 453 break; 454 case 0x6B: 455 pr_info(DRVNAME ": Found SMSC LPC47M292\n"); 456 sio_data->type = smsc47m2; 457 break;
··· 86 #define SUPERIO_REG_ACT 0x30 87 #define SUPERIO_REG_BASE 0x60 88 #define SUPERIO_REG_DEVID 0x20 89 + #define SUPERIO_REG_DEVREV 0x21 90 91 /* Logical device registers */ 92 ··· 429 * The LPC47M292 (device id 0x6B) is somewhat compatible, but it 430 * supports a 3rd fan, and the pin configuration registers are 431 * unfortunately different. 432 + * The LPC47M233 has the same device id (0x6B) but is not compatible. 433 + * We check the high bit of the device revision register to 434 + * differentiate them. 435 */ 436 switch (val) { 437 case 0x51: ··· 448 sio_data->type = smsc47m1; 449 break; 450 case 0x6B: 451 + if (superio_inb(SUPERIO_REG_DEVREV) & 0x80) { 452 + pr_debug(DRVNAME ": " 453 + "Found SMSC LPC47M233, unsupported\n"); 454 + superio_exit(); 455 + return -ENODEV; 456 + } 457 + 458 pr_info(DRVNAME ": Found SMSC LPC47M292\n"); 459 sio_data->type = smsc47m2; 460 break;