All of lore.kernel.org
 help / color / mirror / Atom feed
From: j.w.r.degoede@hhs.nl (Hans de Goede)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] New Abit uGuru driver + libsensors patch, review
Date: Fri, 28 Oct 2005 11:30:10 +0000	[thread overview]
Message-ID: <4361F0DD.8080308@hhs.nl> (raw)
In-Reply-To: <4358B291.6070702@hhs.nl>



Mark M. Hoffman wrote:
> Hi Hans:
> 
> * Hans de Goede <j.w.r.degoede@hhs.nl> [2005-10-21 11:21:22 +0200]:
> 
>>The libsensors patch, I still need to add alarm support. I understand 
>>that is sorta hard todo for 2.6 only drivers, can someone give my any hints?
> 
> 
> I didn't get very far into the review...
> 
> 
>>--- lm_sensors2/etc/sensors.conf.eg.uguru	2005-10-17 14:16:54.000000000 +0200
>>+++ lm_sensors2/etc/sensors.conf.eg	2005-10-17 14:16:54.000000000 +0200
>>@@ -2371,3 +2371,110 @@
>>    set temp2_over  45
>>    set temp2_hyst  40
>> 
>>+
>>+# Abit Uguru sensor part configuration.
>>+# The Abit Uguru is relativly straight forward to configure.
>>+# label statements:
>>+# All the voltage (in) temp and fan sensors should be in the same order
>>+# as listed in the BIOS.
>>+# compute statements:
>>+# The temp and fan sensors don't need any compute statements. The voltage
>>+# sensors are given in raw registervalues by the kernel driver since the
>>+# way they are hooked up differs from one motherboard to another. The voltage
>>+# sensors give values of 0-255 which are linear mapped to one of the following:
>>+# 0-3.49v, 0-4.26v, 0-6.25 volt or 0-14.51 volt. Abit's windows software uses
>>+# the following mutipliers for this: 0.0137, 0.0171, 0.0245 and 0.0569.
>>+# Most voltages will fall in the 0-3.49v range and thus use the 0.0137
>>+# multiplier. 3.3 volt sources use the 0.0171 mutiplier, 5 volt the 0.0245 and
>>+# 12 volt the 0.0569.
> 
> 
> No.  This is not how we do analog inputs.  Notice that no other driver in
> lm_sensors2 or in kernel 2.6 does this.
> 
> The value that is visible outside the driver (in sysfs) is the voltage AT
> THE PIN OF THE HARDWARE.  Now I'll grant you that for a reverse-engineered
> driver, it's difficult if not impossible to be sure what this really is.
> If you're handy with hardware and patient, you could probe the pins of
> the thing w/ a voltmeter and try to gather some clues.
> 
> Otherwise you can guess by two different methods...
> 
> (1) Does uGuru look a whole lot like some other documented chip?  If so,
> guess that it has the same full-scale voltage at each input as the known
> chip and write the driver that way.  E.g. asb100 is similar to w83781d.
> 
> (2) Use Abit's multipliers and just scale the voltages in the driver.
> It's almost certainly not acurate w.r.t. voltage at the pin of the
> hardware... but since they're not releasing a datasheet that's less
> important anyway.
> 
> But certainly, having a kernel driver output 0-255 for a voltage input is
> a huge and unacceptable step backwards.  Please fix that first and then
> we can talk about the rest.
> 

In my first incarnation of the driver I did scale the output with the 
Abit multipliers before reporting them to userspace. The problem is 
however that the uGuru is on a number of different mainboards and the 
multipliers for say in5 differ from mainboard to mainboard, afaik that 
is exactly what sensors.conf is there to handle. To quote from:
lm_sensors2/doc/developers/new_drivers

* A quick note about conversions. The conversions which are specified
   in the sensor chip datasheet and which *cannot* vary from one board to
   the next are performed by the driver. If other conversions are
   necessary, they are performed in user-space.

So I'm not doing any conversion since this differs from one board to the 
next. The 4 multipliers as given in sensors.conf are otherwise 100% 
correct (iow they are not guessed, they are exactly the same multipliers 
as Abit's software uses), the problem is that the driver has no (known) 
way to find out which of the 4 multipliers to use for which analog input.

About the README, that is currently mean't for people who are testing 
the driver for me, hence the "install" part which of course has to go 
when the driver is in tree, I'll convert it to look like the other chips 
docs.

Thanks for your time & Regards,

Hans

  parent reply	other threads:[~2005-10-28 11:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-21 11:15 [lm-sensors] New Abit uGuru driver + libsensors patch, Hans de Goede
2005-10-21 11:16 ` Hans de Goede
2005-10-21 11:17 ` Hans de Goede
2005-10-21 12:26 ` Jean Delvare
2005-10-21 19:41 ` [lm-sensors] New Abit uGuru driver + libsensors patch, review Hans de Goede
2005-10-21 20:01 ` Jean Delvare
2005-10-21 20:20 ` Hans de Goede
2005-10-22  0:17 ` Grant Coady
2005-10-28  0:27 ` [lm-sensors] New Abit uGuru driver + libsensors patch, Matt Stamp
2005-10-28  0:58 ` Hans de Goede
2005-10-28  5:32 ` Mark M. Hoffman
2005-10-28  6:17 ` Mark M. Hoffman
2005-10-28 11:30 ` Hans de Goede [this message]
2005-10-28 20:14 ` [lm-sensors] New Abit uGuru driver + libsensors patch, review Rudolf Marek
2005-10-28 23:08 ` Jean Delvare
2005-10-28 23:13 ` Rudolf Marek
2005-10-29  2:22 ` [lm-sensors] New Abit uGuru driver + libsensors patch, Matthew Stamp
2005-10-29 10:14 ` Hans de Goede
2005-10-29 11:27 ` Matthew Stamp
2005-10-29 12:04 ` [lm-sensors] New Abit uGuru driver + libsensors patch, review Hans de Goede
2005-10-29 19:36 ` [lm-sensors] New Abit uGuru driver + libsensors patch, Matthew Stamp
2005-11-02  0:05 ` [lm-sensors] New Abit uGuru driver + libsensors patch, review Rudolf Marek
2005-11-02 12:22 ` Rudolf Marek
2005-11-02 12:54 ` Hans de Goede
2005-11-02 21:29 ` Jean Delvare
2005-11-02 22:52 ` Hans de Goede

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=4361F0DD.8080308@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.