aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lorblanches <zlika_ese@hotmail.com>2015-02-13 07:19:06 -0500
committerGuenter Roeck <linux@roeck-us.net>2015-03-09 12:59:36 -0400
commita0c1424acb16326d9b741be8db7a3e776fc28b19 (patch)
tree5d066bd4cd5e27308ba4bd6f7bbc8f51b49c0716
parent32dd7c409d52655c4ab68be8e0cdd0985c3fa138 (diff)
hwmon: (it87) Add support for IT8786E
IT8786E is mostly compatible with IT8771 / IT8772. Parameters determined by testing various combinations. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Thomas Lorblanches <zlika_ese@hotmail.com> [Guenter Roeck: merged from github, addressed review comments] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--Documentation/hwmon/it876
-rw-r--r--drivers/hwmon/Kconfig4
-rw-r--r--drivers/hwmon/it87.c22
3 files changed, 23 insertions, 9 deletions
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
index 8e192fff10f4..19fbe775ae10 100644
--- a/Documentation/hwmon/it87
+++ b/Documentation/hwmon/it87
@@ -54,6 +54,10 @@ Supported chips:
54 Prefix: 'it8783' 54 Prefix: 'it8783'
55 Addresses scanned: from Super I/O config space (8 I/O ports) 55 Addresses scanned: from Super I/O config space (8 I/O ports)
56 Datasheet: Not publicly available 56 Datasheet: Not publicly available
57 * IT8786E
58 Prefix: 'it8786'
59 Addresses scanned: from Super I/O config space (8 I/O ports)
60 Datasheet: Not publicly available
57 * SiS950 [clone of IT8705F] 61 * SiS950 [clone of IT8705F]
58 Prefix: 'it87' 62 Prefix: 'it87'
59 Addresses scanned: from Super I/O config space (8 I/O ports) 63 Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -100,7 +104,7 @@ Description
100 104
101This driver implements support for the IT8603E, IT8623E, IT8705F, IT8712F, 105This driver implements support for the IT8603E, IT8623E, IT8705F, IT8712F,
102IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8771E, 106IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8771E,
103IT8772E, IT8781F, IT8782F, IT8783E/F, and SiS950 chips. 107IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, and SiS950 chips.
104 108
105These chips are 'Super I/O chips', supporting floppy disks, infrared ports, 109These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
106joysticks and other miscellaneous stuff. For hardware monitoring, they 110joysticks and other miscellaneous stuff. For hardware monitoring, they
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index e96c0ebaaceb..4b40ea79b20f 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -599,8 +599,8 @@ config SENSORS_IT87
599 help 599 help
600 If you say yes here you get support for ITE IT8705F, IT8712F, 600 If you say yes here you get support for ITE IT8705F, IT8712F,
601 IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, 601 IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E,
602 IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F and IT8603E 602 IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E,
603 sensor chips, and the SiS950 clone. 603 and IT8603E sensor chips, and the SiS950 clone.
604 604
605 This driver can also be built as a module. If so, the module 605 This driver can also be built as a module. If so, the module
606 will be called it87. 606 will be called it87.
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 9ca10a73aee8..691067bbe07c 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -26,6 +26,7 @@
26 * IT8781F Super I/O chip w/LPC interface 26 * IT8781F Super I/O chip w/LPC interface
27 * IT8782F Super I/O chip w/LPC interface 27 * IT8782F Super I/O chip w/LPC interface
28 * IT8783E/F Super I/O chip w/LPC interface 28 * IT8783E/F Super I/O chip w/LPC interface
29 * IT8786E Super I/O chip w/LPC interface
29 * Sis950 A clone of the IT8705F 30 * Sis950 A clone of the IT8705F
30 * 31 *
31 * Copyright (C) 2001 Chris Gauthron 32 * Copyright (C) 2001 Chris Gauthron
@@ -67,7 +68,7 @@
67#define DRVNAME "it87" 68#define DRVNAME "it87"
68 69
69enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8771, 70enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8771,
70 it8772, it8781, it8782, it8783, it8603 }; 71 it8772, it8781, it8782, it8783, it8786, it8603 };
71 72
72static unsigned short force_id; 73static unsigned short force_id;
73module_param(force_id, ushort, 0); 74module_param(force_id, ushort, 0);
@@ -150,6 +151,7 @@ static inline void superio_exit(void)
150#define IT8781F_DEVID 0x8781 151#define IT8781F_DEVID 0x8781
151#define IT8782F_DEVID 0x8782 152#define IT8782F_DEVID 0x8782
152#define IT8783E_DEVID 0x8783 153#define IT8783E_DEVID 0x8783
154#define IT8786E_DEVID 0x8786
153#define IT8603E_DEVID 0x8603 155#define IT8603E_DEVID 0x8603
154#define IT8623E_DEVID 0x8623 156#define IT8623E_DEVID 0x8623
155#define IT87_ACT_REG 0x30 157#define IT87_ACT_REG 0x30
@@ -335,6 +337,12 @@ static const struct it87_devices it87_devices[] = {
335 | FEAT_TEMP_OLD_PECI | FEAT_FAN16_CONFIG, 337 | FEAT_TEMP_OLD_PECI | FEAT_FAN16_CONFIG,
336 .old_peci_mask = 0x4, 338 .old_peci_mask = 0x4,
337 }, 339 },
340 [it8786] = {
341 .name = "it8786",
342 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
343 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI,
344 .peci_mask = 0x07,
345 },
338 [it8603] = { 346 [it8603] = {
339 .name = "it8603", 347 .name = "it8603",
340 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS 348 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
@@ -1789,6 +1797,9 @@ static int __init it87_find(unsigned short *address,
1789 case IT8783E_DEVID: 1797 case IT8783E_DEVID:
1790 sio_data->type = it8783; 1798 sio_data->type = it8783;
1791 break; 1799 break;
1800 case IT8786E_DEVID:
1801 sio_data->type = it8786;
1802 break;
1792 case IT8603E_DEVID: 1803 case IT8603E_DEVID:
1793 case IT8623E_DEVID: 1804 case IT8623E_DEVID:
1794 sio_data->type = it8603; 1805 sio_data->type = it8603;
@@ -1816,8 +1827,8 @@ static int __init it87_find(unsigned short *address,
1816 sio_data->revision = superio_inb(DEVREV) & 0x0f; 1827 sio_data->revision = superio_inb(DEVREV) & 0x0f;
1817 pr_info("Found IT%04x%c chip at 0x%x, revision %d\n", chip_type, 1828 pr_info("Found IT%04x%c chip at 0x%x, revision %d\n", chip_type,
1818 chip_type == 0x8771 || chip_type == 0x8772 || 1829 chip_type == 0x8771 || chip_type == 0x8772 ||
1819 chip_type == 0x8603 ? 'E' : 'F', *address, 1830 chip_type == 0x8786 || chip_type == 0x8603 ? 'E' : 'F',
1820 sio_data->revision); 1831 *address, sio_data->revision);
1821 1832
1822 /* in8 (Vbat) is always internal */ 1833 /* in8 (Vbat) is always internal */
1823 sio_data->internal = (1 << 2); 1834 sio_data->internal = (1 << 2);
@@ -1987,9 +1998,8 @@ static int __init it87_find(unsigned short *address,
1987 if (reg & (1 << 0)) 1998 if (reg & (1 << 0))
1988 sio_data->internal |= (1 << 0); 1999 sio_data->internal |= (1 << 0);
1989 if ((reg & (1 << 1)) || sio_data->type == it8721 || 2000 if ((reg & (1 << 1)) || sio_data->type == it8721 ||
1990 sio_data->type == it8728 || 2001 sio_data->type == it8728 || sio_data->type == it8771 ||
1991 sio_data->type == it8771 || 2002 sio_data->type == it8772 || sio_data->type == it8786)
1992 sio_data->type == it8772)
1993 sio_data->internal |= (1 << 1); 2003 sio_data->internal |= (1 << 1);
1994 2004
1995 /* 2005 /*