[lm-sensors] sensor details for W83627HG-AW
krunal patel
krunal_smiles at yahoo.com
Tue Jun 21 09:10:49 CEST 2011
Hi Jean,
Its working now. Thank you very much for your patch.
dmesg output--------------------w83627hf: Found W83627HF chip at 0x290Using 6-bit VID table for VIA C7-D CPU
# sensors --------------w83627hf-isa-0290Adapter: ISA adapterin0: +0.69 V (min = +0.00 V, max = +4.08 V)in1: +1.06 V (min = +0.00 V, max = +4.08 V)in2: +3.30 V (min = +2.82 V, max = +3.79 V)in3: +2.99 V (min = +3.57 V, max = +1.98 V) ALARMin4: +3.28 V (min = +1.98 V, max = +4.05 V)in5: +3.30 V (min = +3.57 V, max = +3.30 V) ALARMin6: +3.33 V (min = +1.78 V, max = +0.53 V) ALARMin7: +3.30 V (min = +0.77 V, max = +2.29 V) ALARMin8: +3.52 V (min = +3.06 V, max = +0.64 V) ALARMfan1: 0 RPM (min = 13775 RPM, div = 2) ALARMfan2: 0 RPM (min = -1 RPM, div = 2) ALARMfan3: 0 RPM (min = 3515 RPM, div = 2) ALARMtemp1: +52.0 C (high = +9.0 C, hyst = +32.0 C) ALARM sensor = thermistortemp2:
+38.5 C (high = +120.0 C, hyst = +115.0 C) sensor = diodetemp3: -48.0 C (high = +120.0 C, hyst = +115.0 C) sensor = thermistorcpu0_vid: +1.212 Vbeep_enable: enabled
I looked into driver code and hwmon related code. All sensor data is exported to user space using sysfs.
One thing I understood is there is no interrupt mechanism in sensor chip so we need to read data from chip's memory. So for periodic data we need to do polling at userspace (like sensord).
Can I implement timer in driver and do polling in Kernel?
What I want to do is get userspace event only when Alarm is raised. If I implement timer and netlink communication in driver will it be correct way to do it? As I do not find any other way.
Best Regards,Krunal Patel
--- On Mon, 20/6/11, Jean Delvare <khali at linux-fr.org> wrote:
From: Jean Delvare <khali at linux-fr.org>
Subject: Re: [lm-sensors] sensor details for W83627HG-AW
To: "krunal patel" <krunal_smiles at yahoo.com>
Cc: lm-sensors at lm-sensors.org
Date: Monday, 20 June, 2011, 11:30 PM
Hi Krunal,
On Sat, 4 Jun 2011 13:08:18 +0200, Jean Delvare wrote:
> Brilly, Kary, can you help us here, please? Where can we get the VID pin
> codes -> Vcore voltage conversion table for VIA CPU family 6, model 13?
> This is needed to update drivers/hwmon/hwmon-vid.c.
I received information from VIA and was able to update hwmon-vid to
support your CPU. Patch below. I couldn't test it as I don't have the
hardware. I've also made the modified hwmon-vid driver available as a
standalone driver at:
http://khali.linux-fr.org/devel/misc/hwmon-vid/
with instructions at:
http://khali.linux-fr.org/devel/misc/INSTALL
Please test if you can, and report.
From: Jean Delvare <khali at linux-fr.org>
Subject: hwmon-vid: Add support for VIA C7-D
The VIA C7-D CPU (Eden 90 nm) can use two different VID tables, we
have to check the value of a MSR to decide which one to use.
Signed-off-by: Jean Delvare <khali at linux-fr.org>
---
drivers/hwmon/hwmon-vid.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
--- linux-3.0-rc3.orig/drivers/hwmon/hwmon-vid.c 2011-06-20 13:43:24.000000000 +0200
+++ linux-3.0-rc3/drivers/hwmon/hwmon-vid.c 2011-06-20 17:58:18.000000000 +0200
@@ -206,10 +206,30 @@ static struct vrm_model vrm_models[] = {
{X86_VENDOR_CENTAUR, 0x6, 0x9, ANY, 17}, /* C3-M, Eden-N */
{X86_VENDOR_CENTAUR, 0x6, 0xA, 0x7, 0}, /* No information */
{X86_VENDOR_CENTAUR, 0x6, 0xA, ANY, 13}, /* C7, Esther */
+ {X86_VENDOR_CENTAUR, 0x6, 0xD, ANY, 134}, /* C7-D, Eden (90 nm) */
{X86_VENDOR_UNKNOWN, ANY, ANY, ANY, 0} /* stop here */
};
+/*
+ * Special case for VIA C7-D: there are two different possible
+ * VID tables, so we have to figure out first, which one must
+ * be used.
+ */
+static u8 get_via_c7d_vrm(void)
+{
+ unsigned int eax, edx;
+
+ rdmsr(0x198, eax, edx);
+ if ((edx & 0xff) > 0x3f) {
+ pr_info("Using %d-bit VID table for VIA C7-D CPU\n", 7);
+ return 14;
+ } else {
+ pr_info("Using %d-bit VID table for VIA C7-D CPU\n", 6);
+ return 13;
+ }
+}
+
static u8 find_vrm(u8 eff_family, u8 eff_model, u8 eff_stepping, u8 vendor)
{
int i = 0;
@@ -249,6 +269,9 @@ u8 vid_which_vrm(void)
vrm_ret = find_vrm(eff_family, eff_model, eff_stepping, c->x86_vendor);
if (vrm_ret == 0)
pr_info("Unknown VRM version of your x86 CPU\n");
+ if (vrm_ret == 134)
+ vrm_ret = get_via_c7d_vrm();
+
return vrm_ret;
}
--
Jean Delvare
http://khali.linux-fr.org/wishlist.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20110621/98079acc/attachment.html>
More information about the lm-sensors
mailing list