All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Intend to implement ADT7467/ADT7468 driver
Date: Tue, 21 Oct 2008 12:39:12 +0000	[thread overview]
Message-ID: <48FDCD70.601@hhs.nl> (raw)
In-Reply-To: <20081021122146.GA7049@ratte.dhs.org>

Bernhard Rieder wrote:
> Hi Everybody,
> 
> I am currently working on an ADT746[78] driver which will be finished soon.
> 
> However, I am not sure how to react to errors. Which values do I return in case
> the chip reports errors (i.e. temp=-64 is an error value for the temperature reading,
> -63 is ok). Are there somewhere error values defined which can used for this? I do
> not think usinf -64 is a good choice, because the chip has two modes for temperature
> and an error would be reported as -128 in the other mode. Additionally, -64 could be
> interpreted as a real value (at least in sibiria when it is a cold winter day).
> 

To report errors we have a separate sysfs attribute called temp#_fault, I think 
you want to implement that and have it return 1 when read when the temp is 
-64/-128 (normally it should read as 0). For temp#_input you can just return 
the temp even if it is an error, apps should ignore the reading from 
temp#_input when temp#_fault reads 1.

Regards,

Hans

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2008-10-21 12:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21 12:21 [lm-sensors] Intend to implement ADT7467/ADT7468 driver Bernhard Rieder
2008-10-21 12:39 ` Hans de Goede [this message]
2008-10-21 22:43 ` Darrick J. Wong
2008-10-22  6:35 ` 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=48FDCD70.601@hhs.nl \
    --to=j.w.r.degoede@hhs.nl \
    --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.