Harald's C7 temp driver

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

 



Thanks, Lu! That worked as advertised.

With the addition of '* 1000', sensors is reporting seemingly accurate data.

Now, what remains is merging Harald's temperature algorithm with Juerg's 
voltage algorithm. I was planning on creating a module called via_c7temp with 
the working parts of both Harald's and Juerg's work. However, I do not know if 
that is the appropriate thing to do.

Since this was initially Juerg's baby, (and since Juerg is much better at this 
than I ;) ) would you like to handle it? Or direct me in making the needed 
changes?
 
-- 

Justin Chudgar
Information Technology Consultant
5040 Saddlehorn Rd, Weed, CA 96084
530-938-9692 (Home Office)

On Saturday 22 August 2009 02:16:16 am you wrote:
> Dear Justin,
>
>          Harald had a updated version of via_cputemp,
>
>         =============
> diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c
> index 1032355..2abe516 100644
> --- a/drivers/hwmon/via-cputemp.c
> +++ b/drivers/hwmon/via-cputemp.c
> @@ -37,7 +37,7 @@
>  #include <asm/msr.h>
>  #include <asm/processor.h>
>
> -#define DRVNAME        "via-cputemp"
> +#define DRVNAME        "via_cputemp"
>
>  typedef enum { SHOW_TEMP, SHOW_LABEL, SHOW_NAME } SHOW;
>
> @@ -81,7 +81,7 @@ static ssize_t show_temp(struct device *dev,
>        if (err)
>                return -EAGAIN;
>
> -       err = sprintf(buf, "%d\n", eax & 0xffffff);
> +       err = sprintf(buf, "%d\n", (eax & 0xffffff) * 1000);
>
>        return err;
>  }
> =============
>
>        Had you try it?
>        Just a remind.
>
> 2009/8/22 Justin Chudgar <justin at justinzane.com>:
> > I've been messing (clumsily, since I am learning C while doing this...
> > please be patient with me :) with Harald's via_cputemp.ko driver and have
> > noticed that while I do not get readings using his driver as is, some
> > printk's added into his code show that there is a reading being obtained.
> >
> > Here is some sample output:
> > acpitz-virtual-0
> > Adapter: Virtual device
> > temp1: +57.0?C (crit = +105.0?C)
> >
> > c7temp-isa-0000
> > Adapter: ISA adapter
> > in0: +0.84 V
> > temp1: +0.0?C
> >
> > via_cputemp-isa-0000
> > Adapter: ISA adapter
> > Core 0: +0.1?C
> >
> > root at justin-mininote:/lib/modules/2.6.31-rc6justin/kernel/drivers/hwmon#
> > dmesg | tail
> > [28068.954298] TEMP: 53
> > [28075.767438] show_temp: 3
> > [28075.767451] CPU: 0, MSR: 1169, eax: 35, edx: 0, err: 3
> > [28075.767459] TEMP: 53
> > [28096.575734] show_temp: 3
> > [28096.575746] CPU: 0, MSR: 1169, eax: 37, edx: 0, err: 3
> > [28096.575753] TEMP: 55
> > [28156.787908] show_temp: 3
> > [28156.787920] CPU: 0, MSR: 1169, eax: 38, edx: 0, err: 3
> > [28156.787928] TEMP: 56
> >
> > As you can see, the dmesg log shows a CPU temp that tracks with but does
> > not exactly duplicate the ACPI temp. To me, this means that I am probably
> > getting good data.
> >
> > The function in question is show_temp on lines 69-86 in the attached
> > code. If someone can help me understand how the string buffer 'buf' with
> > the temperature reading is supposed to be passed on to userland code, I'd
> > appreciate it.
> >
> > Once again, please be patient as I am NOT a programmer, just a guy with a
> > C7 cpu who want to get lm-sensors working.
> >
> > Thanks.
> >
> >
> > _______________________________________________
> > lm-sensors mailing list
> > lm-sensors at lm-sensors.org
> > http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20090822/413ecf76/attachment.html 


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

  Powered by Linux