From: Clemens Ladisch <clemens@ladisch.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: Serge Belyshev <belyshev@depni.sinp.msu.ru>,
linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org
Subject: Re: [PATCH v3] k10temp: temperature sensor for AMD Family 10h/11h CPUs
Date: Tue, 24 Nov 2009 15:09:57 +0100 [thread overview]
Message-ID: <4B0BE935.1050708@ladisch.de> (raw)
In-Reply-To: <20091124142654.76f4d166@hyperion.delvare>
Jean Delvare wrote:
> On Tue, 24 Nov 2009 09:43:29 +0100, Clemens Ladisch wrote:
> > In any case, it might make more sense to show such values as something
> > like "20 °C below maximum".
>
> I think so, yes. Now the difficulty is to come up with a suitable sysfs
> interface. Dropping the current interface altogether doesn't sound
> right as it will take time before a new version of libsensors is
> written and spread out and all applications add support for the new
> interface. In the meantime, I guess we want users to still see the
> approximate value.
k10temp is a new driver, so no old systems would break if it introduced
a new class of measurements with names like, e.g., reltemp#_*.
We could add this in parallel with the old interface. If we wanted to.
> So ideally we would come up with an interface that adds up to the one
> we have currently. Future libsensors/applications could read the extra
> information to display the value in a different format so that the
> users see the difference.
>
> An idea I have about this is adding a sysfs file temp#_relative, which
> would contain the fake temperature value that is used as a reference
> for the thermal sensor in question. In the case of k10temp, the value
> would be 70000. So for example we would have:
>
> temp1_input: 46000
> temp1_relative: 70000
>
> Old applications would display this as 46°C while new ones would
> display "24°C below the limit".
In this case, temp1_relative is identical with temp1_max. In the
general case, there always must be some kind of limit (whether "max" or
"crit" or something else) against which the values are measured,
otherwise a relative value would not make sense.
This means that one of the already existing limit values must be the
reference base, so we'd need just a mechanism to specify which of them
is it, i.e., "temp1_relative_base: max". If we'd have
"temp1_relative: 70000", the application would have to search among the
limit values for one with the same value.
(It doesn't really matter which one is the base, as all values are
relative anyway, so we could just define that temp#_max is the base;
so we'd have "temp1_relative: true").
> It may not be considered flexible enough though... For example it does
> not support sensors with totally arbitrary scales (where 1000 != 1°C.)
When the scale differs but is _known_, the driver can just rescale its
internal register values to millidegrees.
When we have some scale like "0%...100%", that should probably be
exported as "pwm#_target" or something like that.
Best regards,
Clemens
next prev parent reply other threads:[~2009-11-24 14:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4AF91F70.10106@ladisch.de>
2009-11-20 8:15 ` [PATCH] k10temp: temperature sensor for AMD Family 10h/11h CPUs Clemens Ladisch
2009-11-20 10:22 ` Serge Belyshev
2009-11-20 10:44 ` [lm-sensors] " Jean Delvare
2009-11-20 10:47 ` [PATCH v2] " Clemens Ladisch
2009-11-20 11:30 ` [lm-sensors] " Jean Delvare
2009-11-20 11:56 ` Clemens Ladisch
2009-11-20 12:18 ` Jean Delvare
2009-11-23 7:45 ` [PATCH v3] " Clemens Ladisch
2009-11-23 13:51 ` Jean Delvare
2009-11-23 15:29 ` Clemens Ladisch
2009-11-23 19:05 ` Jean Delvare
2009-11-24 8:43 ` Clemens Ladisch
2009-11-24 13:26 ` Jean Delvare
2009-11-24 14:09 ` Clemens Ladisch [this message]
2009-11-24 20:11 ` Jean Delvare
2009-11-25 9:51 ` Clemens Ladisch
2009-11-26 20:44 ` Jean Delvare
2009-11-27 13:03 ` Clemens Ladisch
2010-01-10 14:45 ` Jean Delvare
2010-01-15 9:57 ` Clemens Ladisch
2010-01-15 13:31 ` Jean Delvare
2009-11-24 8:43 ` [PATCH v4] " Clemens Ladisch
2009-11-25 19:45 ` Andrew Morton
2009-11-26 7:46 ` Clemens Ladisch
2009-11-27 15:43 ` Jean Delvare
2009-11-28 7:48 ` Andrew Morton
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=4B0BE935.1050708@ladisch.de \
--to=clemens@ladisch.de \
--cc=belyshev@depni.sinp.msu.ru \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox