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

Diff of /genpatches-2.6/trunk/2.6.28/2900_IT8720-chipset-support-and-type-values-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1418 Revision 1419
1From: Jean-Marc Spaggiari <jean-marc@spaggiari.org> 1From: Jean-Marc Spaggiari <jean-marc@spaggiari.org>
2Date: Mon, 27 Oct 2008 23:32:00 +0000 (+1100) 2Date: Mon, 1 Dec 2008 22:24:31 +0000 (+1100)
3Subject: hwmon: (it87) Add support for the ITE IT8720F 3Subject: hwmon: (it87) Add support for the ITE IT8720F
4X-Git-Tag: next-20081028~38^2 4X-Git-Tag: next-20081203~53^2~6
5X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fsfr%2Flinux-next.git;a=commitdiff_plain;h=47fd550939fc9f1dd0a20a59d4db83f9b7a164ad 5X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fsfr%2Flinux-next.git;a=commitdiff_plain;h=19ec1c4104174bdfb04ddbb09546a1b4bc64f6c2
6 6
7hwmon: (it87) Add support for the ITE IT8720F 7hwmon: (it87) Add support for the ITE IT8720F
8 8
9Allow it87.c to handle IT8720 chipset like IT8718 in order to 9Allow it87.c to handle IT8720 chipset like IT8718 in order to
10retrieve voltage, temperatures and fans speed from sensors 10retrieve voltage, temperatures and fans speed from sensors
72+The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) 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 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. 74 the mainboard and/or processor itself. It is a value in volts.
75 75
76diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig 76diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
77index 032593b..9551e40 100644 77index 2be02d3..e6e2b7d 100644
78--- a/drivers/hwmon/Kconfig 78--- a/drivers/hwmon/Kconfig
79+++ b/drivers/hwmon/Kconfig 79+++ b/drivers/hwmon/Kconfig
80@@ -389,7 +389,8 @@ config SENSORS_IT87 80@@ -399,7 +399,8 @@ config SENSORS_IT87
81 select HWMON_VID 81 select HWMON_VID
82 help 82 help
83 If you say yes here you get support for ITE IT8705F, IT8712F, 83 If you say yes here you get support for ITE IT8705F, IT8712F,
84- IT8716F, IT8718F and IT8726F sensor chips, and the SiS960 clone. 84- IT8716F, IT8718F and IT8726F sensor chips, and the SiS960 clone.
85+ IT8716F, IT8718F, IT8720F and IT8726F sensor chips, and the 85+ IT8716F, IT8718F, IT8720F and IT8726F sensor chips, and the
203-MODULE_DESCRIPTION("IT8705F/8712F/8716F/8718F/8726F, SiS950 driver"); 203-MODULE_DESCRIPTION("IT8705F/8712F/8716F/8718F/8726F, SiS950 driver");
204+MODULE_DESCRIPTION("IT8705F/8712F/8716F/8718F/8720F/8726F, SiS950 driver"); 204+MODULE_DESCRIPTION("IT8705F/8712F/8716F/8718F/8720F/8726F, SiS950 driver");
205 module_param(update_vbat, bool, 0); 205 module_param(update_vbat, bool, 0);
206 MODULE_PARM_DESC(update_vbat, "Update vbat if set else return powerup value"); 206 MODULE_PARM_DESC(update_vbat, "Update vbat if set else return powerup value");
207 module_param(fix_pwm_polarity, bool, 0); 207 module_param(fix_pwm_polarity, bool, 0);
208
209From: Jean Delvare <khali@linux-fr.org>
210Date: Fri, 17 Oct 2008 15:51:16 +0000 (+0200)
211Subject: hwmon: (it87) Fix thermal sensor type values
212X-Git-Tag: v2.6.28-rc1~259^2~18
213X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=4ed1077953f531b3fef4af4b4ade48a828c48869
214
215hwmon: (it87) Fix thermal sensor type values
216
217The it87 driver doesn't follow the standard sensor type values as
218documented in Documentation/hwmon/sysfs-interface. It uses value 2 for
219thermistors instead of value 4. This causes "sensors" to tell the user
220that the chip is setup for a transistor while it is actually setup for
221a thermistor.
222
223Using value 4 for thermistors solves the problem. For compatibility
224reasons, we still accept value 2 but emit a warning message so that
225users update their configuration files.
226
227Signed-off-by: Jean Delvare <khali@linux-fr.org>
228Acked-by: Hans de Goede <hdegoede@redhat.com>
229---
230
231diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
232index 3496b70..042c041 100644
233--- a/Documentation/hwmon/it87
234+++ b/Documentation/hwmon/it87
235@@ -136,10 +136,10 @@ once-only alarms.
236 The IT87xx only updates its values each 1.5 seconds; reading it more often
237 will do no harm, but will return 'old' values.
238
239-To change sensor N to a thermistor, 'echo 2 > tempN_type' where N is 1, 2,
240+To change sensor N to a thermistor, 'echo 4 > tempN_type' where N is 1, 2,
241 or 3. To change sensor N to a thermal diode, 'echo 3 > tempN_type'.
242 Give 0 for unused sensor. Any other value is invalid. To configure this at
243-startup, consult lm_sensors's /etc/sensors.conf. (2 = thermistor;
244+startup, consult lm_sensors's /etc/sensors.conf. (4 = thermistor;
245 3 = thermal diode)
246
247
248diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
249index d793cc0..b74c957 100644
250--- a/drivers/hwmon/it87.c
251+++ b/drivers/hwmon/it87.c
252@@ -477,7 +477,7 @@ static ssize_t show_sensor(struct device *dev, struct device_attribute *attr,
253 if (reg & (1 << nr))
254 return sprintf(buf, "3\n"); /* thermal diode */
255 if (reg & (8 << nr))
256- return sprintf(buf, "2\n"); /* thermistor */
257+ return sprintf(buf, "4\n"); /* thermistor */
258 return sprintf(buf, "0\n"); /* disabled */
259 }
260 static ssize_t set_sensor(struct device *dev, struct device_attribute *attr,
261@@ -493,10 +493,15 @@ static ssize_t set_sensor(struct device *dev, struct device_attribute *attr,
262
263 data->sensor &= ~(1 << nr);
264 data->sensor &= ~(8 << nr);
265- /* 3 = thermal diode; 2 = thermistor; 0 = disabled */
266+ if (val == 2) { /* backwards compatibility */
267+ dev_warn(dev, "Sensor type 2 is deprecated, please use 4 "
268+ "instead\n");
269+ val = 4;
270+ }
271+ /* 3 = thermal diode; 4 = thermistor; 0 = disabled */
272 if (val == 3)
273 data->sensor |= 1 << nr;
274- else if (val == 2)
275+ else if (val == 4)
276 data->sensor |= 8 << nr;
277 else if (val != 0) {
278 mutex_unlock(&data->update_lock);
279

Legend:
Removed from v.1418  
changed lines
  Added in v.1419

  ViewVC Help
Powered by ViewVC 1.1.20