From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: lm77 on national sc1100
Date: Thu, 19 May 2005 06:25:04 +0000 [thread overview]
Message-ID: <20040705230052.54a29042.khali@linux-fr.org> (raw)
In-Reply-To: <1088690691.2862.25.camel@null>
> Yes, it makes sense now. But I'm not sure how to handle the fact that
> the hysteresis register applies to three temperature limits in the
> LM77. Say, the register value for hysteresis is 2 degrees, T_crit€,
> T_high`. So the driver should show T_crit_hystx, T_high_hystX.
> Now if the user changes T_crit to 90, T_crit_hyst should be still 78,
> so the hysteresis register should hold 12 now. However that would mean
> that T_high_hyst will show 68 now. Does it make sense? (I have
> doubts.) And what if T_high is changed by the user? Should the
> hysteresis be updated accordingly? Does that make sense? I don't think
> so, that would screw up the hysteresis for T_crit. What is your
> suggestion?
You're correct, there is a kind of probleme here. Don't keep searching,
this problem has no solution. This is the reason why I suggested that
temp1_min_hyst and temp1_max_hyst would be read-only. That way, it
clearly states that these are computed values and user should not assume
anything about these. Of course, having knowledge about the chip and the
way the driver is implemented helps understanding why things are that
way. But the basic rules apply:
- read-write files can be set be the user in any order (although there
may be limitations)
- nothing should be assumed about read-only files
A library or program handling the chips interfaces in a generic way
would always set base limits first and corresponding hysteresis then,
because it always works best that way.
Of course some choices (such as preferring critical limit over min or
max) are arbitrary, but that's the way it goes. You cannot define a
common interface to chips with different designs without some additional
work and limitations. All in all it is believed to be the best tradeoff.
Thanks,
--
Jean Delvare
http://khali.linux-fr.org/
next prev parent reply other threads:[~2005-05-19 6:25 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 6:25 lm77 on national sc1100 Andras BALI
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare [this message]
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Andras BALI
2005-05-19 6:25 ` Andras BALI
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=20040705230052.54a29042.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.