From: krunal patel <krunal_smiles@yahoo.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] sensor details for W83627HG-AW
Date: Tue, 21 Jun 2011 07:22:49 +0000 [thread overview]
Message-ID: <927002.8256.qm@web95808.mail.in.yahoo.com> (raw)
In-Reply-To: <838315.8004.qm@web95806.mail.in.yahoo.com>
[-- Attachment #1.1: Type: text/plain, Size: 4685 bytes --]
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@linux-fr.org> wrote:
From: Jean Delvare <khali@linux-fr.org>
Subject: Re: [lm-sensors] sensor details for W83627HG-AW
To: "krunal patel" <krunal_smiles@yahoo.com>
Cc: lm-sensors@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@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@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
[-- Attachment #1.2: Type: text/html, Size: 7409 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-06-21 7:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 6:13 [lm-sensors] sensor details for W83627HG-AW krunal patel
2011-06-04 11:08 ` Jean Delvare
2011-06-08 6:32 ` BrillyWu
2011-06-08 7:45 ` Jean Delvare
2011-06-09 2:41 ` BrillyWu
2011-06-09 8:21 ` Jean Delvare
2011-06-20 18:00 ` Jean Delvare
2011-06-21 7:22 ` krunal patel [this message]
2011-06-21 11:50 ` Jean Delvare
2011-06-21 11:59 ` Guenter Roeck
2011-06-22 8:23 ` krunal patel
2011-06-22 8:34 ` krunal patel
2011-06-22 16:00 ` Jean Delvare
2011-06-24 11:31 ` krunal patel
2011-06-27 15:02 ` Jean Delvare
2011-06-29 8:17 ` krunal patel
2011-06-30 12:20 ` Jean Delvare
2011-07-02 10:53 ` krunal patel
2011-07-03 7:14 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=927002.8256.qm@web95808.mail.in.yahoo.com \
--to=krunal_smiles@yahoo.com \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.