Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Mike Pagano (mpagano)" <mpagano@g.o>
Subject: linux-patches r1372 - genpatches-2.6/trunk/2.6.27
Date: Fri, 07 Nov 2008 16:29:58 +0000
Author: mpagano
Date: 2008-11-07 16:29:58 +0000 (Fri, 07 Nov 2008)
New Revision: 1372

Added:
   genpatches-2.6/trunk/2.6.27/2900_IT8720-chipset-support-and-type-values-fix.patch
Modified:
   genpatches-2.6/trunk/2.6.27/0000_README
Log:
Patch to retrieve sensor information from the IT8720 chipset and type values fixes

Modified: genpatches-2.6/trunk/2.6.27/0000_README
===================================================================
--- genpatches-2.6/trunk/2.6.27/0000_README	2008-11-05 02:12:16 UTC (rev 1371)
+++ genpatches-2.6/trunk/2.6.27/0000_README	2008-11-07 16:29:58 UTC (rev 1372)
@@ -63,6 +63,10 @@
 From:	http://bugs.gentoo.org/show_bug.cgi?id=245369
 Desc:	Patch to fix setkey policy breakage
 
+Patch:	2900_IT8720-chipset-support-and-type-values-fix.patch
+From:	http://bugs.gentoo.org/show_bug.cgi?id=245625
+Desc:	Patch to retrieve sensor information from the IT8720 chipset and type values fixes
+
 Patch:	4100_dm-bbr.patch
 From:	EVMS 2.5.2
 Desc:	Bad block relocation support for LiveCD users

Added: genpatches-2.6/trunk/2.6.27/2900_IT8720-chipset-support-and-type-values-fix.patch
===================================================================
--- genpatches-2.6/trunk/2.6.27/2900_IT8720-chipset-support-and-type-values-fix.patch	                        (rev 0)
+++ genpatches-2.6/trunk/2.6.27/2900_IT8720-chipset-support-and-type-values-fix.patch	2008-11-07 16:29:58 UTC (rev 1372)
@@ -0,0 +1,279 @@
+From: Jean-Marc Spaggiari <jean-marc@...>
+Date: Mon, 27 Oct 2008 23:32:00 +0000 (+1100)
+Subject: hwmon: (it87) Add support for the ITE IT8720F
+X-Git-Tag: next-20081028~38^2
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fsfr%2Flinux-next.git;a=commitdiff_plain;h=47fd550939fc9f1dd0a20a59d4db83f9b7a164ad
+
+hwmon: (it87) Add support for the ITE IT8720F
+
+Allow it87.c to handle IT8720 chipset like IT8718 in order to
+retrieve voltage, temperatures and fans speed from sensors
+tools. Also updating the related documentation.
+
+Signed-off-by: Jean-Marc Spaggiari <jean-marc@...>
+Signed-off-by: Jean Delvare <khali@...>
+---
+
+diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
+index 042c041..659315d 100644
+--- a/Documentation/hwmon/it87
++++ b/Documentation/hwmon/it87
+@@ -26,6 +26,10 @@ Supported chips:
+     Datasheet: Publicly available at the ITE website
+                http://www.ite.com.tw/product_info/file/pc/IT8718F_V0.2.zip
+                http://www.ite.com.tw/product_info/file/pc/IT8718F_V0%203_(for%20C%20version).zip
++  * IT8720F
++    Prefix: 'it8720'
++    Addresses scanned: from Super I/O config space (8 I/O ports)
++    Datasheet: Not yet publicly available.
+   * SiS950   [clone of IT8705F]
+     Prefix: 'it87'
+     Addresses scanned: from Super I/O config space (8 I/O ports)
+@@ -71,7 +75,7 @@ Description
+ -----------
+ 
+ This driver implements support for the IT8705F, IT8712F, IT8716F,
+-IT8718F, IT8726F and SiS950 chips.
++IT8718F, IT8720F, IT8726F and SiS950 chips.
+ 
+ These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
+ joysticks and other miscellaneous stuff. For hardware monitoring, they
+@@ -84,19 +88,19 @@ the IT8716F and late IT8712F have 6. They are shared with other functions
+ though, so the functionality may not be available on a given system.
+ The driver dumbly assume it is there.
+ 
+-The IT8718F also features VID inputs (up to 8 pins) but the value is
+-stored in the Super-I/O configuration space. Due to technical limitations,
++The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value
++is stored in the Super-I/O configuration space. Due to technical limitations,
+ this value can currently only be read once at initialization time, so
+ the driver won't notice and report changes in the VID value. The two
+ upper VID bits share their pins with voltage inputs (in5 and in6) so you
+ can't have both on a given board.
+ 
+-The IT8716F, IT8718F and later IT8712F revisions have support for
++The IT8716F, IT8718F, IT8720F and later IT8712F revisions have support for
+ 2 additional fans. The additional fans are supported by the driver.
+ 
+-The IT8716F and IT8718F, and late IT8712F and IT8705F also have optional
+-16-bit tachometer counters for fans 1 to 3. This is better (no more fan
+-clock divider mess) but not compatible with the older chips and
++The IT8716F, IT8718F and IT8720F, and late IT8712F and IT8705F also have
++optional 16-bit tachometer counters for fans 1 to 3. This is better (no more
++fan clock divider mess) but not compatible with the older chips and
+ revisions. The 16-bit tachometer mode is enabled by the driver when one
+ of the above chips is detected.
+ 
+@@ -122,7 +126,7 @@ zero'; this is important for negative voltage measurements. All voltage
+ inputs can measure voltages between 0 and 4.08 volts, with a resolution of
+ 0.016 volt. The battery voltage in8 does not have limit registers.
+ 
+-The VID lines (IT8712F/IT8716F/IT8718F) encode the core voltage value:
++The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) encode the core voltage value:
+ the voltage level your processor should work with. This is hardcoded by
+ the mainboard and/or processor itself. It is a value in volts.
+ 
+diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
+index 032593b..9551e40 100644
+--- a/drivers/hwmon/Kconfig
++++ b/drivers/hwmon/Kconfig
+@@ -389,7 +389,8 @@ config SENSORS_IT87
+ 	select HWMON_VID
+ 	help
+ 	  If you say yes here you get support for ITE IT8705F, IT8712F,
+-	  IT8716F, IT8718F and IT8726F sensor chips, and the SiS960 clone.
++	  IT8716F, IT8718F, IT8720F and IT8726F sensor chips, and the
++	  SiS960 clone.
+ 
+ 	  This driver can also be built as a module.  If so, the module
+ 	  will be called it87.
+diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
+index b74c957..0e0d692 100644
+--- a/drivers/hwmon/it87.c
++++ b/drivers/hwmon/it87.c
+@@ -14,6 +14,7 @@
+               IT8712F  Super I/O chip w/LPC interface
+               IT8716F  Super I/O chip w/LPC interface
+               IT8718F  Super I/O chip w/LPC interface
++              IT8720F  Super I/O chip w/LPC interface
+               IT8726F  Super I/O chip w/LPC interface
+               Sis950   A clone of the IT8705F
+ 
+@@ -52,7 +53,7 @@
+ 
+ #define DRVNAME "it87"
+ 
+-enum chips { it87, it8712, it8716, it8718 };
++enum chips { it87, it8712, it8716, it8718, it8720 };
+ 
+ static unsigned short force_id;
+ module_param(force_id, ushort, 0);
+@@ -64,7 +65,10 @@ static struct platform_device *pdev;
+ #define	DEV	0x07	/* Register: Logical device select */
+ #define	VAL	0x2f	/* The value to read/write */
+ #define PME	0x04	/* The device with the fan registers in it */
+-#define GPIO	0x07	/* The device with the IT8718F VID value in it */
++
++/* The device with the IT8718F/IT8720F VID value in it */
++#define GPIO	0x07
++
+ #define	DEVID	0x20	/* Register: Device ID */
+ #define	DEVREV	0x22	/* Register: Device Revision */
+ 
+@@ -113,6 +117,7 @@ superio_exit(void)
+ #define IT8705F_DEVID 0x8705
+ #define IT8716F_DEVID 0x8716
+ #define IT8718F_DEVID 0x8718
++#define IT8720F_DEVID 0x8720
+ #define IT8726F_DEVID 0x8726
+ #define IT87_ACT_REG  0x30
+ #define IT87_BASE_REG 0x60
+@@ -150,8 +155,8 @@ static int fix_pwm_polarity;
+ #define IT87_REG_ALARM2        0x02
+ #define IT87_REG_ALARM3        0x03
+ 
+-/* The IT8718F has the VID value in a different register, in Super-I/O
+-   configuration space. */
++/* The IT8718F and IT8720F have the VID value in a different register, in
++   Super-I/O configuration space. */
+ #define IT87_REG_VID           0x0a
+ /* The IT8705F and IT8712F earlier than revision 0x08 use register 0x0b
+    for fan divisors. Later IT8712F revisions must use 16-bit tachometer
+@@ -282,7 +287,8 @@ static inline int has_16bit_fans(const struct it87_data *data)
+ 	return (data->type == it87 && data->revision >= 0x03)
+ 	    || (data->type == it8712 && data->revision >= 0x08)
+ 	    || data->type == it8716
+-	    || data->type == it8718;
++	    || data->type == it8718
++	    || data->type == it8720;
+ }
+ 
+ static int it87_probe(struct platform_device *pdev);
+@@ -992,6 +998,9 @@ static int __init it87_find(unsigned short *address,
+ 	case IT8718F_DEVID:
+ 		sio_data->type = it8718;
+ 		break;
++	case IT8720F_DEVID:
++		sio_data->type = it8720;
++		break;
+ 	case 0xffff:	/* No device at all */
+ 		goto exit;
+ 	default:
+@@ -1022,7 +1031,8 @@ static int __init it87_find(unsigned short *address,
+ 		int reg;
+ 
+ 		superio_select(GPIO);
+-		if (chip_type == it8718)
++		if ((chip_type == it8718) ||
++		    (chip_type == it8720))
+ 			sio_data->vid_value = superio_inb(IT87_SIO_VID_REG);
+ 
+ 		reg = superio_inb(IT87_SIO_PINX2_REG);
+@@ -1068,6 +1078,7 @@ static int __devinit it87_probe(struct platform_device *pdev)
+ 		"it8712",
+ 		"it8716",
+ 		"it8718",
++		"it8720",
+ 	};
+ 
+ 	res = platform_get_resource(pdev, IORESOURCE_IO, 0);
+@@ -1226,7 +1237,7 @@ static int __devinit it87_probe(struct platform_device *pdev)
+ 	}
+ 
+ 	if (data->type == it8712 || data->type == it8716
+-	 || data->type == it8718) {
++	 || data->type == it8718 || data->type == it8720) {
+ 		data->vrm = vid_which_vrm();
+ 		/* VID reading from Super-I/O config space if available */
+ 		data->vid = sio_data->vid_value;
+@@ -1513,7 +1524,8 @@ static struct it87_data *it87_update_device(struct device *dev)
+ 
+ 		data->sensor = it87_read_value(data, IT87_REG_TEMP_ENABLE);
+ 		/* The 8705 does not have VID capability.
+-		   The 8718 does not use IT87_REG_VID for the same purpose. */
++		   The 8718 and the 8720 don't use IT87_REG_VID for the
++		   same purpose. */
+ 		if (data->type == it8712 || data->type == it8716) {
+ 			data->vid = it87_read_value(data, IT87_REG_VID);
+ 			/* The older IT8712F revisions had only 5 VID pins,
+@@ -1608,7 +1620,7 @@ static void __exit sm_it87_exit(void)
+ 
+ MODULE_AUTHOR("Chris Gauthron, "
+ 	      "Jean Delvare <khali@...>");
+-MODULE_DESCRIPTION("IT8705F/8712F/8716F/8718F/8726F, SiS950 driver");
++MODULE_DESCRIPTION("IT8705F/8712F/8716F/8718F/8720F/8726F, SiS950 driver");
+ module_param(update_vbat, bool, 0);
+ MODULE_PARM_DESC(update_vbat, "Update vbat if set else return powerup value");
+ module_param(fix_pwm_polarity, bool, 0);
+
+From: Jean Delvare <khali@...>
+Date: Fri, 17 Oct 2008 15:51:16 +0000 (+0200)
+Subject: hwmon: (it87) Fix thermal sensor type values
+X-Git-Tag: v2.6.28-rc1~259^2~18
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=4ed1077953f531b3fef4af4b4ade48a828c48869
+
+hwmon: (it87) Fix thermal sensor type values
+
+The it87 driver doesn't follow the standard sensor type values as
+documented in Documentation/hwmon/sysfs-interface. It uses value 2 for
+thermistors instead of value 4. This causes "sensors" to tell the user
+that the chip is setup for a transistor while it is actually setup for
+a thermistor.
+
+Using value 4 for thermistors solves the problem. For compatibility
+reasons, we still accept value 2 but emit a warning message so that
+users update their configuration files.
+
+Signed-off-by: Jean Delvare <khali@...>
+Acked-by: Hans de Goede <hdegoede@...>
+---
+
+diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
+index 3496b70..042c041 100644
+--- a/Documentation/hwmon/it87
++++ b/Documentation/hwmon/it87
+@@ -136,10 +136,10 @@ once-only alarms.
+ The IT87xx only updates its values each 1.5 seconds; reading it more often
+ will do no harm, but will return 'old' values.
+ 
+-To change sensor N to a thermistor, 'echo 2 > tempN_type' where N is 1, 2,
++To change sensor N to a thermistor, 'echo 4 > tempN_type' where N is 1, 2,
+ or 3. To change sensor N to a thermal diode, 'echo 3 > tempN_type'.
+ Give 0 for unused sensor. Any other value is invalid. To configure this at
+-startup, consult lm_sensors's /etc/sensors.conf. (2 = thermistor;
++startup, consult lm_sensors's /etc/sensors.conf. (4 = thermistor;
+ 3 = thermal diode)
+ 
+ 
+diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
+index d793cc0..b74c957 100644
+--- a/drivers/hwmon/it87.c
++++ b/drivers/hwmon/it87.c
+@@ -477,7 +477,7 @@ static ssize_t show_sensor(struct device *dev, struct device_attribute *attr,
+ 	if (reg & (1 << nr))
+ 		return sprintf(buf, "3\n");  /* thermal diode */
+ 	if (reg & (8 << nr))
+-		return sprintf(buf, "2\n");  /* thermistor */
++		return sprintf(buf, "4\n");  /* thermistor */
+ 	return sprintf(buf, "0\n");      /* disabled */
+ }
+ static ssize_t set_sensor(struct device *dev, struct device_attribute *attr,
+@@ -493,10 +493,15 @@ static ssize_t set_sensor(struct device *dev, struct device_attribute *attr,
+ 
+ 	data->sensor &= ~(1 << nr);
+ 	data->sensor &= ~(8 << nr);
+-	/* 3 = thermal diode; 2 = thermistor; 0 = disabled */
++	if (val == 2) {	/* backwards compatibility */
++		dev_warn(dev, "Sensor type 2 is deprecated, please use 4 "
++			 "instead\n");
++		val = 4;
++	}
++	/* 3 = thermal diode; 4 = thermistor; 0 = disabled */
+ 	if (val == 3)
+ 	    data->sensor |= 1 << nr;
+-	else if (val == 2)
++	else if (val == 4)
+ 	    data->sensor |= 8 << nr;
+ 	else if (val != 0) {
+ 		mutex_unlock(&data->update_lock);
+



Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
portage r11819 - main/trunk/pym/portage/dbapi
Next by thread:
gentoo-x86 commit in lxde-base/lxde-meta: metadata.xml lxde-meta-0.3.2.1.ebuild ChangeLog
Previous by date:
gentoo-x86 commit in net-ftp/filezilla: ChangeLog filezilla-3.1.3.1.ebuild
Next by date:
gentoo-x86 commit in lxde-base/lxde-meta: metadata.xml lxde-meta-0.3.2.1.ebuild ChangeLog


Updated Jun 10, 2010

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.