From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (adt7475) Fix temperature fault
Date: Sun, 15 Nov 2009 19:03:57 +0000 [thread overview]
Message-ID: <20091115200357.417dbd91@hyperion.delvare> (raw)
In-Reply-To: <20091109113746.337b8062@hyperion.delvare>
On Sun, 15 Nov 2009 19:57:26 +0100, Hans de Goede wrote:
> On 11/15/2009 05:54 PM, Jean Delvare wrote:
> > On Mon, 9 Nov 2009 13:26:21 +0100, Jean Delvare wrote:
> >> Thanks for the feedback. I have tested on 3 dumps I have here, one
> >> ADT7475 and two ADT7473. The ADT7475 reports -64°C for temp1 and temp3
> >> and has both fault bits set to 1. The two ADT7473 reports reasonable
> >> values for both temp1 and temp3 and have the fault bits set to 0.
> >> Assuming that the ADT7473 and ADT7475 are almost the same chip and
> >> should thus behave the same, my change would be correct.
> >>
> >> I have also noticed that Jordan's original code did not have the
> >> inversion:
> >>
> >> http://lists.lm-sensors.org/pipermail/lm-sensors/2008-January/022338.html
> >>
> >> case FAULT:
> >> /* Note - only for remote1 and remote2 */
> >>
> >> ret = sprintf(buf, "%d\n",
> >> (data->alarms& (sattr->index ? 0x4000 : 0x8000)));
> >> break;
> >>
> >> but it lacked normalization (output value 0x4000 or 0x8000 instead of
> >> 1.) Maybe when normalizing the logic was inverted by accident?
> >>
> >> The few ADT7475 data points I have found on the web suggest that on
> >> many boards temp1 and temp3 are not connected. This could explain why
> >> the bug went unnoticed so far. Why vendors use these chips, which are
> >> specifically designed for automatic temperature-based fan speed
> >> control, in designs where they don't bother wiring the thermal sensors,
> >> is beyond me.
> >>
> >> Anyway, I will wait for you to return home and test on your system,
> >> before sending the patch to Linus.
> >
> > Hans, did you have the time to test this patch?
>
> I did not get around to it sofar, but I had already planned to do it this
> evening, so I just have. Your patch seems to be correct when run on real
> hardware (and the current code in the kernel is thus wrong).
OK, thanks. I'll send the fix to Linus shortly.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
prev parent reply other threads:[~2009-11-15 19:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-09 10:37 [lm-sensors] [PATCH] hwmon: (adt7475) Fix temperature fault flags Jean Delvare
2009-11-09 10:51 ` [lm-sensors] [PATCH] hwmon: (adt7475) Fix temperature fault Hans de Goede
2009-11-09 12:26 ` Jean Delvare
2009-11-15 16:54 ` Jean Delvare
2009-11-15 18:57 ` Hans de Goede
2009-11-15 19:03 ` Jean Delvare [this message]
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=20091115200357.417dbd91@hyperion.delvare \
--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.