[PATCH] lm_sensors2 : Fix W83627THF VID reading

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

 



Hello,
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
+0800
@@ -887,7 +887,7 @@ 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 */
@@ -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??.




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

  Powered by Linux