/[linux-patches]/genpatches-2.6/tags/2.6.28-1/2900_IT8720-chipset-support-and-type-values-fix.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.28-1/2900_IT8720-chipset-support-and-type-values-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1451 - (show annotations) (download)
Thu Dec 25 01:56:17 2008 UTC (5 years, 11 months ago) by dsd
File size: 8645 byte(s)
2.6.28-1 release
1 From: Jean-Marc Spaggiari <jean-marc@spaggiari.org>
2 Date: Mon, 1 Dec 2008 22:24:31 +0000 (+1100)
3 Subject: hwmon: (it87) Add support for the ITE IT8720F
4 X-Git-Tag: next-20081203~53^2~6
5 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fsfr%2Flinux-next.git;a=commitdiff_plain;h=19ec1c4104174bdfb04ddbb09546a1b4bc64f6c2
6
7 hwmon: (it87) Add support for the ITE IT8720F
8
9 Allow it87.c to handle IT8720 chipset like IT8718 in order to
10 retrieve voltage, temperatures and fans speed from sensors
11 tools. Also updating the related documentation.
12
13 Signed-off-by: Jean-Marc Spaggiari <jean-marc@spaggiari.org>
14 Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 ---
16
17 diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
18 index 042c041..659315d 100644
19 --- a/Documentation/hwmon/it87
20 +++ b/Documentation/hwmon/it87
21 @@ -26,6 +26,10 @@ Supported chips:
22 Datasheet: Publicly available at the ITE website
23 http://www.ite.com.tw/product_info/file/pc/IT8718F_V0.2.zip
24 http://www.ite.com.tw/product_info/file/pc/IT8718F_V0%203_(for%20C%20version).zip
25 + * IT8720F
26 + Prefix: 'it8720'
27 + Addresses scanned: from Super I/O config space (8 I/O ports)
28 + Datasheet: Not yet publicly available.
29 * SiS950 [clone of IT8705F]
30 Prefix: 'it87'
31 Addresses scanned: from Super I/O config space (8 I/O ports)
32 @@ -71,7 +75,7 @@ Description
33 -----------
34
35 This driver implements support for the IT8705F, IT8712F, IT8716F,
36 -IT8718F, IT8726F and SiS950 chips.
37 +IT8718F, IT8720F, IT8726F and SiS950 chips.
38
39 These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
40 joysticks and other miscellaneous stuff. For hardware monitoring, they
41 @@ -84,19 +88,19 @@ the IT8716F and late IT8712F have 6. They are shared with other functions
42 though, so the functionality may not be available on a given system.
43 The driver dumbly assume it is there.
44
45 -The IT8718F also features VID inputs (up to 8 pins) but the value is
46 -stored in the Super-I/O configuration space. Due to technical limitations,
47 +The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value
48 +is stored in the Super-I/O configuration space. Due to technical limitations,
49 this value can currently only be read once at initialization time, so
50 the driver won't notice and report changes in the VID value. The two
51 upper VID bits share their pins with voltage inputs (in5 and in6) so you
52 can't have both on a given board.
53
54 -The IT8716F, IT8718F and later IT8712F revisions have support for
55 +The IT8716F, IT8718F, IT8720F and later IT8712F revisions have support for
56 2 additional fans. The additional fans are supported by the driver.
57
58 -The IT8716F and IT8718F, and late IT8712F and IT8705F also have optional
59 -16-bit tachometer counters for fans 1 to 3. This is better (no more fan
60 -clock divider mess) but not compatible with the older chips and
61 +The IT8716F, IT8718F and IT8720F, and late IT8712F and IT8705F also have
62 +optional 16-bit tachometer counters for fans 1 to 3. This is better (no more
63 +fan clock divider mess) but not compatible with the older chips and
64 revisions. The 16-bit tachometer mode is enabled by the driver when one
65 of the above chips is detected.
66
67 @@ -122,7 +126,7 @@ zero'; this is important for negative voltage measurements. All voltage
68 inputs can measure voltages between 0 and 4.08 volts, with a resolution of
69 0.016 volt. The battery voltage in8 does not have limit registers.
70
71 -The VID lines (IT8712F/IT8716F/IT8718F) encode the core voltage value:
72 +The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) encode the core voltage value:
73 the voltage level your processor should work with. This is hardcoded by
74 the mainboard and/or processor itself. It is a value in volts.
75
76 diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
77 index 2be02d3..e6e2b7d 100644
78 --- a/drivers/hwmon/Kconfig
79 +++ b/drivers/hwmon/Kconfig
80 @@ -399,7 +399,8 @@ config SENSORS_IT87
81 select HWMON_VID
82 help
83 If you say yes here you get support for ITE IT8705F, IT8712F,
84 - IT8716F, IT8718F and IT8726F sensor chips, and the SiS960 clone.
85 + IT8716F, IT8718F, IT8720F and IT8726F sensor chips, and the
86 + SiS960 clone.
87
88 This driver can also be built as a module. If so, the module
89 will be called it87.
90 diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
91 index b74c957..0e0d692 100644
92 --- a/drivers/hwmon/it87.c
93 +++ b/drivers/hwmon/it87.c
94 @@ -14,6 +14,7 @@
95 IT8712F Super I/O chip w/LPC interface
96 IT8716F Super I/O chip w/LPC interface
97 IT8718F Super I/O chip w/LPC interface
98 + IT8720F Super I/O chip w/LPC interface
99 IT8726F Super I/O chip w/LPC interface
100 Sis950 A clone of the IT8705F
101
102 @@ -52,7 +53,7 @@
103
104 #define DRVNAME "it87"
105
106 -enum chips { it87, it8712, it8716, it8718 };
107 +enum chips { it87, it8712, it8716, it8718, it8720 };
108
109 static unsigned short force_id;
110 module_param(force_id, ushort, 0);
111 @@ -64,7 +65,10 @@ static struct platform_device *pdev;
112 #define DEV 0x07 /* Register: Logical device select */
113 #define VAL 0x2f /* The value to read/write */
114 #define PME 0x04 /* The device with the fan registers in it */
115 -#define GPIO 0x07 /* The device with the IT8718F VID value in it */
116 +
117 +/* The device with the IT8718F/IT8720F VID value in it */
118 +#define GPIO 0x07
119 +
120 #define DEVID 0x20 /* Register: Device ID */
121 #define DEVREV 0x22 /* Register: Device Revision */
122
123 @@ -113,6 +117,7 @@ superio_exit(void)
124 #define IT8705F_DEVID 0x8705
125 #define IT8716F_DEVID 0x8716
126 #define IT8718F_DEVID 0x8718
127 +#define IT8720F_DEVID 0x8720
128 #define IT8726F_DEVID 0x8726
129 #define IT87_ACT_REG 0x30
130 #define IT87_BASE_REG 0x60
131 @@ -150,8 +155,8 @@ static int fix_pwm_polarity;
132 #define IT87_REG_ALARM2 0x02
133 #define IT87_REG_ALARM3 0x03
134
135 -/* The IT8718F has the VID value in a different register, in Super-I/O
136 - configuration space. */
137 +/* The IT8718F and IT8720F have the VID value in a different register, in
138 + Super-I/O configuration space. */
139 #define IT87_REG_VID 0x0a
140 /* The IT8705F and IT8712F earlier than revision 0x08 use register 0x0b
141 for fan divisors. Later IT8712F revisions must use 16-bit tachometer
142 @@ -282,7 +287,8 @@ static inline int has_16bit_fans(const struct it87_data *data)
143 return (data->type == it87 && data->revision >= 0x03)
144 || (data->type == it8712 && data->revision >= 0x08)
145 || data->type == it8716
146 - || data->type == it8718;
147 + || data->type == it8718
148 + || data->type == it8720;
149 }
150
151 static int it87_probe(struct platform_device *pdev);
152 @@ -992,6 +998,9 @@ static int __init it87_find(unsigned short *address,
153 case IT8718F_DEVID:
154 sio_data->type = it8718;
155 break;
156 + case IT8720F_DEVID:
157 + sio_data->type = it8720;
158 + break;
159 case 0xffff: /* No device at all */
160 goto exit;
161 default:
162 @@ -1022,7 +1031,8 @@ static int __init it87_find(unsigned short *address,
163 int reg;
164
165 superio_select(GPIO);
166 - if (chip_type == it8718)
167 + if ((chip_type == it8718) ||
168 + (chip_type == it8720))
169 sio_data->vid_value = superio_inb(IT87_SIO_VID_REG);
170
171 reg = superio_inb(IT87_SIO_PINX2_REG);
172 @@ -1068,6 +1078,7 @@ static int __devinit it87_probe(struct platform_device *pdev)
173 "it8712",
174 "it8716",
175 "it8718",
176 + "it8720",
177 };
178
179 res = platform_get_resource(pdev, IORESOURCE_IO, 0);
180 @@ -1226,7 +1237,7 @@ static int __devinit it87_probe(struct platform_device *pdev)
181 }
182
183 if (data->type == it8712 || data->type == it8716
184 - || data->type == it8718) {
185 + || data->type == it8718 || data->type == it8720) {
186 data->vrm = vid_which_vrm();
187 /* VID reading from Super-I/O config space if available */
188 data->vid = sio_data->vid_value;
189 @@ -1513,7 +1524,8 @@ static struct it87_data *it87_update_device(struct device *dev)
190
191 data->sensor = it87_read_value(data, IT87_REG_TEMP_ENABLE);
192 /* The 8705 does not have VID capability.
193 - The 8718 does not use IT87_REG_VID for the same purpose. */
194 + The 8718 and the 8720 don't use IT87_REG_VID for the
195 + same purpose. */
196 if (data->type == it8712 || data->type == it8716) {
197 data->vid = it87_read_value(data, IT87_REG_VID);
198 /* The older IT8712F revisions had only 5 VID pins,
199 @@ -1608,7 +1620,7 @@ static void __exit sm_it87_exit(void)
200
201 MODULE_AUTHOR("Chris Gauthron, "
202 "Jean Delvare <khali@linux-fr.org>");
203 -MODULE_DESCRIPTION("IT8705F/8712F/8716F/8718F/8726F, SiS950 driver");
204 +MODULE_DESCRIPTION("IT8705F/8712F/8716F/8718F/8720F/8726F, SiS950 driver");
205 module_param(update_vbat, bool, 0);
206 MODULE_PARM_DESC(update_vbat, "Update vbat if set else return powerup value");
207 module_param(fix_pwm_polarity, bool, 0);

  ViewVC Help
Powered by ViewVC 1.1.20