All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] hwmon API update
Date: Mon, 28 Feb 2011 23:24:37 +0000	[thread overview]
Message-ID: <1298935477.5974.32.camel@workstation> (raw)
In-Reply-To: <4D57CC24.1040306@free.fr>

Am Montag, den 28.02.2011, 10:42 -0800 schrieb Guenter Roeck:
> On Mon, Feb 28, 2011 at 12:50:45PM -0500, Lucas Stach wrote:
> > Hello all,
> >  
> > let me revive this discussion a bit. After reading some things about the
> > matter I think the way to go is to use Intels thermal framework. It
> > should be easy to add the needed temp_get and fan_set functions to the
> > affected hwmon drivers. 
> > 
> > But then one problem still persists: when the hwmon driver probes a
> > device it automatically creates the sysfs entries. This is unintended
> > behaviour from nouveau's point of view. The sensor value is not the real
> > temperature value; it has to be scaled with some factor and an offset
> > hard-coded in the video bios tables. This scaling could only be done on
> > nouveau's side, so the hwmon driver is exposing an interface with wrong
> > values to the userspace.
> > 
> > We need a way to use the hwmon i2c driver without exposing this
> > interface. Do you have any preferred way how we could achieve this?
> > 
> The whole point of the hwmon subsystem is to expose hardware monitoring
> attributes to userspace. A hwmon driver without sysfs attributes does not
> make sense.
> 
> Guenter

I see your point. So the best way to move forward is to write a separate
module which exposes the thermal framework API and duplicate the needed
code.

Who does the review for thermal api drivers? I remember some discussion
about the Intel medfield driver which landed in the platform directory,
but I think a driver like the one for adt747x has to go
to /drivers/thermal where I couldn't find a maintainer. Could you give
me some hint here?

--Lucas
> 
> > I see two ways to do this:
> > 1. Sort out if we need the sysfs entries in the probe function. This
> > could be done with some name postfix in the board_info. Downside: adds
> > some noise to this function.
> > 
> > 2. Creating a new module which only exposes the thermal framework API.
> > This leads to code duplication and we end up with two drivers for the
> > same i2c monitoring chip. On the other hand this _could_ lead to cleaner
> > code and we could move this part to drivers/thermal instead of
> > drivers/hwmon. I don't like the code duplication, do you see any chance
> > to avoid this in case this is the way to go?
> > 
> > Please comment on my thoughts, we need your feedback to bring up an API
> > everyone could agree on. I'm willing to hack together a prototype over
> > the next week, but want to avoid running in a completely wrong
> > direction.
> > 
> > -- Lucas



_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2011-02-28 23:24 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-13 12:18 [lm-sensors] hwmon API update Martin Peres
2011-02-13 12:18 ` Martin Peres
2011-02-13 17:16 ` [lm-sensors] " Guenter Roeck
2011-02-13 17:16   ` Guenter Roeck
2011-02-13 20:00   ` [lm-sensors] " Martin Peres
2011-02-13 20:00     ` Martin Peres
2011-02-13 22:08   ` [lm-sensors] " Jean Delvare
2011-02-13 22:08     ` Jean Delvare
     [not found]     ` <20110213230833.0ee2ff16-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-03-03  9:36       ` [lm-sensors] [Nouveau] " Dave Airlie
2011-03-03  9:36         ` [lm-sensors] " Dave Airlie
     [not found]         ` <AANLkTindG=m4FhNS202MH8YVBUCoDEADTQLxo-Bf_8qx-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-03 13:09           ` [lm-sensors] [Nouveau] " Martin Peres
2011-03-03 13:09             ` [lm-sensors] " Martin Peres
2011-03-03 15:22         ` [lm-sensors] [Nouveau] " Guenter Roeck
2011-03-03 15:22           ` Guenter Roeck
     [not found]           ` <20110303152216.GA21667-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-03-03 17:29             ` [lm-sensors] " Martin Peres
2011-03-03 17:29               ` [lm-sensors] " Martin Peres
     [not found]               ` <4D6FCFF2.7040604-GANU6spQydw@public.gmane.org>
2011-03-03 20:48                 ` [lm-sensors] [Nouveau] " Lucas Stach
2011-03-03 20:48                   ` [lm-sensors] " Lucas Stach
2011-03-03 21:19                   ` [lm-sensors] [Nouveau] " Guenter Roeck
2011-03-03 21:19                     ` Guenter Roeck
2011-03-03 21:56                     ` [lm-sensors] " Lucas Stach
2011-03-03 21:56                       ` [lm-sensors] " Lucas Stach
2011-03-03 22:03                       ` [lm-sensors] [Nouveau] " Guenter Roeck
2011-03-03 22:03                         ` [lm-sensors] " Guenter Roeck
2011-03-03 23:53                         ` [lm-sensors] [Nouveau] " Martin Peres
2011-03-03 23:53                           ` [lm-sensors] " Martin Peres
     [not found]                           ` <4D7029E8.4040706-GANU6spQydw@public.gmane.org>
2011-03-04  0:59                             ` [lm-sensors] [Nouveau] " Guenter Roeck
2011-03-04  0:59                               ` [lm-sensors] " Guenter Roeck
     [not found]                               ` <20110304005900.GB31318-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-03-04  8:36                                 ` [lm-sensors] [Nouveau] " Martin Peres
2011-03-04  8:36                                   ` [lm-sensors] " Martin Peres
2011-02-14 16:23 ` Matthew Garrett
2011-02-14 18:19 ` Guenter Roeck
2011-02-14 18:22 ` Matthew Garrett
2011-02-14 19:01 ` Guenter Roeck
2011-02-14 19:05 ` Matthew Garrett
2011-02-14 19:33 ` Guenter Roeck
2011-02-14 19:40 ` Matthew Garrett
2011-02-14 21:25 ` Guenter Roeck
2011-02-14 21:29 ` Matthew Garrett
2011-02-15 21:50 ` Jean Delvare
2011-02-15 22:07 ` Jean Delvare
2011-02-15 22:23 ` Guenter Roeck
2011-02-28 17:50 ` Lucas Stach
2011-02-28 18:42 ` Guenter Roeck
2011-02-28 23:24 ` Lucas Stach [this message]
2011-10-10 22:29 ` Kristen Eisenberg

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=1298935477.5974.32.camel@workstation \
    --to=dev@lynxeye.de \
    --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.