patch hwmon-w83627thf-fix-vrm-and-vid.patch added to gregkh-2.6 tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

     Subject: [PATCH 03/25] hwmon: W83627THF VID fixes

to my gregkh-2.6 tree.  Its filename is

     hwmon-w83627thf-fix-vrm-and-vid.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/

Patches currently in gregkh-2.6 which might be from khali at linux-fr.org are

i2c/hwmon-adm1025-adm1026-remove-deprecated-symbols.patch
i2c/i2c-ds1337-init.patch
i2c/i2c-i801-explicitly-set-smbauxctl.patch
i2c/hwmon-lm85-adt7463-vrm-10.patch
i2c/hwmon-vt8231-new-driver.patch
i2c/hwmon-w83627thf-fix-vrm-and-vid.patch
i2c/hwmon-w83627thf-vid-documentation-update.patch
i2c/i2c-parport-barco-ltp-dvi.patch
i2c/i2c-rtc8564-remove-duplicate-bcd-macros.patch


>From khali at linux-fr.org Sat Nov 26 19:23:50 2005
Date: Sat, 26 Nov 2005 20:13:18 +0100
From: Jean Delvare <khali at linux-fr.org>
To: Greg KH <greg at kroah.com>
Cc: LM Sensors <lm-sensors at lm-sensors.org>, Yuan Mu <ymu at winbond.com.tw>
Subject: [PATCH 03/25] hwmon: W83627THF VID fixes
Message-Id: <20051126201318.0c86d9d3.khali at linux-fr.org>
Content-Disposition: inline; filename=hwmon-w83627thf-fix-vrm-and-vid.patch

From: Yuan Mu <ymu at winbond.com.tw>

This patch fixes the VID reading; no cpu0_vid and vrm files created if
the chip is w83627thf and GPIO5 not enabled.

Signed-off-by: Yuan Mu <ymu at winbond.com.tw>
Signed-off-by: Jean Delvare <khali at linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
 drivers/hwmon/w83627hf.c |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

--- gregkh-2.6.orig/drivers/hwmon/w83627hf.c
+++ gregkh-2.6/drivers/hwmon/w83627hf.c
@@ -1122,11 +1122,10 @@ static int w83627hf_detect(struct i2c_ad
 	if (kind != w83697hf)
 		device_create_file_temp(new_client, 3);
 
-	if (kind != w83697hf)
+	if (kind != w83697hf && data->vid != 0xff) {
 		device_create_file_vid(new_client);
-
-	if (kind != w83697hf)
 		device_create_file_vrm(new_client);
+	}
 
 	device_create_file_fan_div(new_client, 1);
 	device_create_file_fan_div(new_client, 2);
@@ -1232,7 +1231,7 @@ static int w83627thf_read_gpio5(struct i
 
 	/* Make sure the pins are configured for input
 	   There must be at least five (VRM 9), and possibly 6 (VRM 10) */
-	sel = superio_inb(W83627THF_GPIO5_IOSR);
+	sel = superio_inb(W83627THF_GPIO5_IOSR) & 0x3f;
 	if ((sel & 0x1f) != 0x1f) {
 		dev_dbg(&client->dev, "GPIO5 not configured for VID "
 			"function\n");
@@ -1323,19 +1322,18 @@ static void w83627hf_init_client(struct 
 		int hi = w83627hf_read_value(client, W83781D_REG_CHIPID);
 		data->vid = (lo & 0x0f) | ((hi & 0x01) << 4);
 	} else if (w83627thf == data->type) {
-		data->vid = w83627thf_read_gpio5(client) & 0x3f;
+		data->vid = w83627thf_read_gpio5(client);
 	}
 
 	/* Read VRM & OVT Config only once */
 	if (w83627thf == data->type || w83637hf == data->type) {
 		data->vrm_ovt = 
 			w83627hf_read_value(client, W83627THF_REG_VRM_OVT_CFG);
-		data->vrm = (data->vrm_ovt & 0x01) ? 90 : 82;
-	} else {
-		/* Convert VID to voltage based on default VRM */
-		data->vrm = vid_which_vrm();
 	}
 
+	/* Convert VID to voltage based on VRM */
+	data->vrm = vid_which_vrm();
+
 	tmp = w83627hf_read_value(client, W83781D_REG_SCFG1);
 	for (i = 1; i <= 3; i++) {
 		if (!(tmp & BIT_SCFG1[i - 1])) {




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux