summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/it87.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-09-07 19:34:41 -0400
committerGuenter Roeck <linux@roeck-us.net>2013-02-06 12:57:56 -0500
commitb06367070de3d9f50e4f8f82b92e77ba9a8ebf8f (patch)
tree0b2ea48fa06a573bcace0c9edd4a44a9635dd27c /drivers/hwmon/it87.c
parent5372d2d71c46e5649e5d2edd4514adcd6fe7a085 (diff)
hwmon: (it87) Add support for IT8771E and IT8772E
Assume that IT8771E and IT8772E are fully compatible with IT8728F. IT8771E support contributed by Kelly Anderson. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/it87.c')
-rw-r--r--drivers/hwmon/it87.c39
1 files changed, 35 insertions, 4 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 29632e849285..37fc980fde24 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -19,6 +19,8 @@
19 * IT8726F Super I/O chip w/LPC interface 19 * IT8726F Super I/O chip w/LPC interface
20 * IT8728F Super I/O chip w/LPC interface 20 * IT8728F Super I/O chip w/LPC interface
21 * IT8758E Super I/O chip w/LPC interface 21 * IT8758E Super I/O chip w/LPC interface
22 * IT8771E Super I/O chip w/LPC interface
23 * IT8772E Super I/O chip w/LPC interface
22 * IT8782F Super I/O chip w/LPC interface 24 * IT8782F Super I/O chip w/LPC interface
23 * IT8783E/F Super I/O chip w/LPC interface 25 * IT8783E/F Super I/O chip w/LPC interface
24 * Sis950 A clone of the IT8705F 26 * Sis950 A clone of the IT8705F
@@ -61,8 +63,8 @@
61 63
62#define DRVNAME "it87" 64#define DRVNAME "it87"
63 65
64enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8782, 66enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8771,
65 it8783 }; 67 it8772, it8782, it8783 };
66 68
67static unsigned short force_id; 69static unsigned short force_id;
68module_param(force_id, ushort, 0); 70module_param(force_id, ushort, 0);
@@ -140,6 +142,8 @@ static inline void superio_exit(void)
140#define IT8721F_DEVID 0x8721 142#define IT8721F_DEVID 0x8721
141#define IT8726F_DEVID 0x8726 143#define IT8726F_DEVID 0x8726
142#define IT8728F_DEVID 0x8728 144#define IT8728F_DEVID 0x8728
145#define IT8771E_DEVID 0x8771
146#define IT8772E_DEVID 0x8772
143#define IT8782F_DEVID 0x8782 147#define IT8782F_DEVID 0x8782
144#define IT8783E_DEVID 0x8783 148#define IT8783E_DEVID 0x8783
145#define IT87_ACT_REG 0x30 149#define IT87_ACT_REG 0x30
@@ -281,6 +285,24 @@ static const struct it87_devices it87_devices[] = {
281 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI, 285 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI,
282 .peci_mask = 0x07, 286 .peci_mask = 0x07,
283 }, 287 },
288 [it8771] = {
289 .name = "it8771",
290 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
291 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI,
292 /* PECI: guesswork */
293 /* 12mV ADC (OHM) */
294 /* 16 bit fans (OHM) */
295 .peci_mask = 0x07,
296 },
297 [it8772] = {
298 .name = "it8772",
299 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
300 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI,
301 /* PECI (coreboot) */
302 /* 12mV ADC (HWSensors4, OHM) */
303 /* 16 bit fans (HWSensors4, OHM) */
304 .peci_mask = 0x07,
305 },
284 [it8782] = { 306 [it8782] = {
285 .name = "it8782", 307 .name = "it8782",
286 .features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET 308 .features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET
@@ -1708,6 +1730,12 @@ static int __init it87_find(unsigned short *address,
1708 case IT8728F_DEVID: 1730 case IT8728F_DEVID:
1709 sio_data->type = it8728; 1731 sio_data->type = it8728;
1710 break; 1732 break;
1733 case IT8771E_DEVID:
1734 sio_data->type = it8771;
1735 break;
1736 case IT8772E_DEVID:
1737 sio_data->type = it8772;
1738 break;
1711 case IT8782F_DEVID: 1739 case IT8782F_DEVID:
1712 sio_data->type = it8782; 1740 sio_data->type = it8782;
1713 break; 1741 break;
@@ -1825,10 +1853,11 @@ static int __init it87_find(unsigned short *address,
1825 1853
1826 reg = superio_inb(IT87_SIO_GPIO3_REG); 1854 reg = superio_inb(IT87_SIO_GPIO3_REG);
1827 if (sio_data->type == it8721 || sio_data->type == it8728 || 1855 if (sio_data->type == it8721 || sio_data->type == it8728 ||
1856 sio_data->type == it8771 || sio_data->type == it8772 ||
1828 sio_data->type == it8782) { 1857 sio_data->type == it8782) {
1829 /* 1858 /*
1830 * IT8721F/IT8758E, and IT8782F don't have VID pins 1859 * IT8721F/IT8758E, and IT8782F don't have VID pins
1831 * at all, not sure about the IT8728F. 1860 * at all, not sure about the IT8728F and compatibles.
1832 */ 1861 */
1833 sio_data->skip_vid = 1; 1862 sio_data->skip_vid = 1;
1834 } else { 1863 } else {
@@ -1882,7 +1911,9 @@ static int __init it87_find(unsigned short *address,
1882 if (reg & (1 << 0)) 1911 if (reg & (1 << 0))
1883 sio_data->internal |= (1 << 0); 1912 sio_data->internal |= (1 << 0);
1884 if ((reg & (1 << 1)) || sio_data->type == it8721 || 1913 if ((reg & (1 << 1)) || sio_data->type == it8721 ||
1885 sio_data->type == it8728) 1914 sio_data->type == it8728 ||
1915 sio_data->type == it8771 ||
1916 sio_data->type == it8772)
1886 sio_data->internal |= (1 << 1); 1917 sio_data->internal |= (1 << 1);
1887 1918
1888 /* 1919 /*