From: Guenter Roeck <guenter.roeck@ericsson.com>
To: "J, KEERTHY" <j-keerthy@ti.com>
Cc: "lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
"sameo@linux.intel.com" <sameo@linux.intel.com>,
"mikko.k.ylinen@nokia.com" <mikko.k.ylinen@nokia.com>,
"amit.kucheria@canonical.com" <amit.kucheria@canonical.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 2/2] hwmon: twl4030: Hwmon Driver for TWL4030 MADC
Date: Wed, 16 Feb 2011 10:30:23 -0800 [thread overview]
Message-ID: <20110216183023.GA15254@ericsson.com> (raw)
In-Reply-To: <AANLkTimEUA0ifx=FoNL1ACqFveG0pHEJ4fpcFMAQxvxB@mail.gmail.com>
On Wed, Feb 16, 2011 at 12:59:52PM -0500, J, KEERTHY wrote:
> Hello Guenter,
>
> On Wed, Feb 16, 2011 at 9:39 PM, Guenter Roeck
> <guenter.roeck@ericsson.com> wrote:
> > On Wed, Feb 16, 2011 at 07:56:57AM -0500, Keerthy wrote:
> >> This driver exposes the sysfs nodes of the TWL4030 MADC module.
> >> All the channel values are expressed in terms of mV. Channel 13
> >> and channel 14 are reserved. There are channels which represent
> >> temperature and current. Even they output raw voltage in mV.
> >>
> > Why ?
>
> The conversion to current and temperature in case of MADC depends
> on a register in the battery module. Hence battery driver can expose the
> converted value. So providing the raw voltage here.
Not a good reason.
You could create an API to let you retrieve the register values.
You could read the respective registers directly.
You could provide the register values in platform data.
If there will always be just one instance of the driver, you could provide
the register values via module parameters.
You could present the raw temperature/current values and correct it
with sensors3.conf.
Either case, I don't think it is a good idea to present known temperatures
or currents as voltage.
Guenter
next prev parent reply other threads:[~2011-02-16 18:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 12:56 [PATCH 2/2] hwmon: twl4030: Hwmon Driver for TWL4030 MADC Keerthy
2011-02-16 16:09 ` Guenter Roeck
2011-02-16 17:59 ` J, KEERTHY
2011-02-16 18:30 ` Guenter Roeck [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-02-16 12:28 Keerthy
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=20110216183023.GA15254@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=amit.kucheria@canonical.com \
--cc=j-keerthy@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=mikko.k.ylinen@nokia.com \
--cc=sameo@linux.intel.com \
/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