[lm-sensors] [PATCH] lm_sensors2 : Fix W83627THF VID reading

Ymu at winbond.com.tw Ymu at winbond.com.tw
Tue Nov 15 07:44:59 CET 2005

This patch fixes the VID reading; VID will always return 0 when GPIO5 of
w83627thf is not enabled.
Please check.

Signed-off-by: Yuan Mu <ymu at winbond.com.tw>

--- lm_sensors2.orig/kernel/chips/w83627hf.c	2005-11-08
03:09:18.000000000 +0800
+++ lm_sensors2/kernel/chips/w83627hf.c	2005-11-15 13:40:08.000000000
@@ -887,7 +887,7 @@ static void w83627hf_init_client(struct 
 		int hi = w83627hf_read_value(client,
 		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 */
@@ -1184,8 +1184,10 @@ void w83627hf_vid(struct i2c_client *cli
 	if (operation == SENSORS_PROC_REAL_INFO)
 		*nrels_mag = 3;
 	else if (operation == SENSORS_PROC_REAL_READ) {
-		w83627hf_update_client(client);
-		results[0] = vid_from_reg(data->vid, data->vrm);
+		if (data->vid == 0xff && w83627thf == data->type)
+			results[0] = 0;
+		else
+			results[0] = vid_from_reg(data->vid, data->vrm);
 		*nrels_mag = 1;

Best Regards
Yuan Mu

===========================================================================================The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such  a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond.
===========================================================================================If your computer is unable to decode Chinese font, please ignore the following message.It essentially repeats the statement in English given above.¥»«H¥ó¤º©Ò§tµØ¨¹¹q¤lªº°]²£©Ê¾÷±K©Ê¸ê°T, ¶È±ÂÅv­ìµo«H¤H«ü©w¤§¦¬«H¤H¨ú¾\\¤§¥Î. °²¨Ï±z¨Ã«D³Q«ü©w¤§¦¬«H¤H©Î¦]¥ô¦ó­ì¦]¦b¥¼¸g±ÂÅvªº±¡§Î¤§¤U¦¬¨ì¥»«H¥ó, ½Ð±z§iª¾­ìµo«H¤H¨Ã¥ß§Y±N«H¥ó±q¹q¸£»Pºô¸ô¦øªA¾¹¤¤¤©¥H®ø°£. ¹ï©ó±zªº¦X§@, §Ú­Ì¥ý¦¹­PÁÂ. ¯S¦¹´£¿ô, ¥ô¦ó¥¼¸g±ÂÅv¾Õ¦Û¨Ï¥ÎµØ¨¹¹q¤lªº¾÷±K¸ê°Tªº¦æ¬°¬O³QÄY®æ¸T¤îªº. «H¥ó»PµØ¨¹¹q¤lÀç·~µLÃö¤§¤º®e,¤£±oµø¬°µØ¨¹¹q¤l¤§¥ß³õ©Î·N¨£.

More information about the lm-sensors mailing list