From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Proposal
Date: Sat, 16 Jun 2007 19:40:42 +0000 [thread overview]
Message-ID: <46743CBA.7070009@hhs.nl> (raw)
In-Reply-To: <200704081630.17151.hjk@linutronix.de>
Mark M. Hoffman wrote:
> Hi Hans:
>
>> Jean Delvare wrote:
>>> This is absolutely not different from all other hardware monitoring
>>> drivers. And all other drivers handle it in user-space, because that's
>>> the right design. I see no valid reason why it would be different for
>>> your abituguru3 driver. All you need is one configuration file per
>>> motherboard.
>
> * Hans de Goede <j.w.r.degoede@hhs.nl> [2007-04-09 14:50:03 +0200]:
>> Oh and yet another thing, since when should all conversions be done in
>> userspace? I did exactly that with the abituguru 1/2 driver and there I had to
>> change it to give the return the actual pin values in Volts and not register
>> values, iow do the conversion in the driver.
>> [...]
>
> The kernel-to-userspace interface for hwmon is the *measured* value at the
> *pin*, in natural units.
>
> If the pin on a chip can measure e.g. 0.0-5.0 volts, then the sysfs file will
> report that voltage.
>
> If that same pin is wired into a circuit which is used for measuring a 12V
> power supply (and thus needs further conversion) that is *irrelevant* to the
> driver. The hwmon driver for a well-documented and general purpose sensor chip
> need not concern itself with external circuitry.
>
> (It cannot, short of moving all of libsensors or its equivalent into the kernel,
> which would be horrible. Even if we could track all mainboard types and
> somehow update the kernel with all that info, you still need a way for embedded
> people to reconfigure it for their custom boards or whatever. *That* is why
> we keep libsensors out of the kernel. Not because of "if it can be done in
> userspace, it should" or any nonsense like that.)
>
> A chip like uguru breaks this model, because we have *no* *idea* what it might
> be measuring at the *pin*. But it turns out, it doesn't matter. It's so
> tightly coupled to the mainboard that we can treat the whole thing as a "chip".
> The embedded case goes away (like I mentioned in another thread) because nobody
> is designing the uguru into custom boards anyway.
>
> I hope this rationale for the kernel/userspace API is clear now.
>
It is and always was, but as you say the uguru is a bit of a special case here.
I've got some good news about the fintek f77882fg / epox ep1308 chipb btw, my
student (Hans Edgington) has returned the motherboard and last friday I build a
system with it. I also compiled his driver and I've added / fixed reading of
the voltages, There I'm doing exactly what you describe above, return a sysfs
reading between 0 and 2.048 volts, and then let libsensors scale it depending
on the attached divider circuit.
I still need to merge the patch for true fintek / msi board support and then
I'll post an initial version.
Regards,
Hans
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2007-06-16 19:40 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-08 14:30 [lm-sensors] Proposal Hans-Jürgen Koch
2007-04-08 17:36 ` Hans de Goede
2007-04-08 18:31 ` Hans-Jürgen Koch
2007-04-08 18:56 ` Hans de Goede
2007-04-08 19:18 ` Hans-Jürgen Koch
2007-04-09 11:23 ` Jean Delvare
2007-04-09 11:27 ` Jean Delvare
2007-04-09 12:24 ` Jean Delvare
2007-04-09 12:26 ` Hans de Goede
2007-04-09 12:34 ` Hans de Goede
2007-04-09 12:50 ` Hans de Goede
2007-04-11 11:35 ` Jean Delvare
2007-04-11 11:49 ` Jean Delvare
2007-04-11 11:56 ` Jean Delvare
2007-04-11 13:49 ` Hans de Goede
2007-06-16 15:14 ` Mark M. Hoffman
2007-06-16 15:21 ` Mark M. Hoffman
2007-06-16 15:42 ` Mark M. Hoffman
2007-06-16 19:35 ` Hans de Goede
2007-06-16 19:40 ` Hans de Goede [this message]
2007-06-16 19:50 ` Hans de Goede
2007-06-16 19:52 ` Mark M. Hoffman
2007-06-18 18:31 ` Jean Delvare
2007-06-18 19:58 ` Hans de Goede
2007-06-19 7:59 ` Jean Delvare
2007-06-19 8:15 ` Jean Delvare
2007-06-19 8:31 ` Hans de Goede
2007-06-19 12:27 ` Mark M. Hoffman
2007-06-24 11:43 ` Jean Delvare
2007-06-24 12:11 ` 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=46743CBA.7070009@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.