All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH v2] hwmon/mc13xxx-adc: add support for the MC13892 PMIC
Date: Sat, 28 Jan 2012 18:42:19 +0000	[thread overview]
Message-ID: <20120128184219.GA4443@ericsson.com> (raw)
In-Reply-To: <1317158169-25372-1-git-send-email-u.kleine-koenig@pengutronix.de>

On Sat, Jan 28, 2012 at 01:15:36PM -0500, Jean Delvare wrote:
> On Sat, 28 Jan 2012 09:34:34 -0800, Guenter Roeck wrote:
> > Maybe the perceived problem is that gain and offset are different and all over the place
> > for the various ADCs, so one either needs a whole bunch of functions, or a large
> > case statement, or a table with <gain, offset> per adc. I'd choose the latter,
> > to simplify runtime code. Also, the description of adc->temperature conversion
> > is really quite confusing.
> 
> The die temperature seems to be a simple linear extrapolation, this
> should actually be fairly easy to implement.
> 
> The battery temperature is a typical thermistor computation. It is best
> done in user-space by a libsensors configuration statement (i.e. the
> driver exports a value in mV instead of m°C and sensors.conf takes care
> of the conversion.)
> 
> So I don't see anything particularly frightening here. Do you?
> 
Not really; I didn't expect the implementation to be difficult, just understanding
the documentation.

For the battery temperature, I would prefer to report a temperature if the chip
is configured for it (assuming that can be detected).

At least so far we can not convert voltages to temperatures via sensors.conf,
or can we ?

Thanks,
Guenter

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

  parent reply	other threads:[~2012-01-28 18:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 21:16 [lm-sensors] [PATCH v2] hwmon/mc13xxx-adc: add support for the Uwe Kleine-König
2011-09-29 16:38 ` Guenter Roeck
2011-09-29 18:59 ` Uwe Kleine-König
2012-01-05 13:44 ` Jean Delvare
2012-01-23  9:01 ` [lm-sensors] [PATCH v2] hwmon/mc13xxx-adc: add support for the MC13892 PMIC Uwe Kleine-König
2012-01-27 16:53 ` Jean Delvare
2012-01-27 19:48 ` Uwe Kleine-König
2012-01-27 21:22 ` Guenter Roeck
2012-01-27 21:28 ` Jean Delvare
2012-01-27 21:35 ` Jean Delvare
2012-01-28 17:34 ` Guenter Roeck
2012-01-28 18:15 ` Jean Delvare
2012-01-28 18:42 ` Guenter Roeck [this message]
2012-01-28 20:47 ` Jean Delvare
2012-01-30  7:27 ` David Jander

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=20120128184219.GA4443@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --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.