All of lore.kernel.org
 help / color / mirror / Atom feed
From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] RE: vt8231.c
Date: Wed, 02 Nov 2005 21:56:52 +0000	[thread overview]
Message-ID: <20051102215628.389ce215.khali@linux-fr.org> (raw)
In-Reply-To: <20051102092453.47B1712E9E@bluewhale.planbit.co.uk>

Hi Roger, Knut,

> > But if I use
> > 
> >     compute fan1 @/9 , @*9
> >     set fan1_min 0
> >     set fan1_div 1
> > 
> > that results in a sensors output of
> > 
> >    fan1:     1324 RPM  (min =    0 RPM, div = 1)          ALARM
>
> I'm not sure exactly how the VT8231 generates its alarms.  I'll have to look
> into the device spec and see exactly what it does then get back to you.

This means that my suggestion of changing FAN_FROM_REG earlier today
was probably not correct, and FAN_TO_REG should be changed instead:

static inline u8 FAN_TO_REG(long rpm, int div)
{
	if (rpm = 0)
		return 255;
	return SENSORS_LIMIT(1310720 / (rpm * div), 1, 254);
}

static inline long FAN_FROM_REG(u8 reg, int div)
{
	if (reg = 0 || reg = 255)
		return 0;
	return (1310720 / (reg * div));
}

Ideally we should probably handle the fan speed measurement registers
and the low limit registers differently, as 255 means no low limit (0
RPM) but is still a valid speed measurement. However, I am not certain
the benefit is worth the additional code.

Roger: I am in the process of reviewing all your code. This takes some
time so please be patient. I couldn't finish the review today,
hopefully it will be OK tomorrow.

Thanks,
-- 
Jean Delvare

  parent reply	other threads:[~2005-11-02 21:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-02 10:25 [lm-sensors] RE: vt8231.c Roger Lucas
2005-11-02 14:24 ` Jean Delvare
2005-11-02 15:17 ` Roger Lucas
2005-11-02 19:47 ` Knut Petersen
2005-11-02 20:15 ` Roger Lucas
2005-11-02 20:26 ` Jean Delvare
2005-11-02 21:50 ` Grant Coady
2005-11-02 21:56 ` Jean Delvare [this message]
2005-11-03  0:28 ` Roger Lucas
2005-11-03  4:26 ` Mark M. Hoffman
2005-11-03  6:11 ` Grant Coady
2005-11-06 17:00 ` Jean Delvare
2005-11-06 20:22 ` Roger Lucas
2005-11-07 10:37 ` Jean Delvare
2005-11-07 20:56 ` Roger Lucas
2005-11-09 13:03 ` Jean Delvare
2005-11-09 15:43 ` Roger Lucas
2005-11-15  8:33 ` Jean Delvare
2005-11-15 12:14 ` Roger Lucas
2005-11-15 13:15 ` Jean Delvare
2005-11-15 13:46 ` Roger Lucas
2005-11-15 20:17 ` 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=20051102215628.389ce215.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --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.