From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Linus Walleij <linus.ml.walleij@gmail.com>,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
zdevai@gmail.com
Subject: Re: [PATCH] staging:iio:proof of concept in kernel interface.
Date: Mon, 17 Oct 2011 13:48:07 +0100 [thread overview]
Message-ID: <20111017124807.GD27266@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4E9C201D.30905@cam.ac.uk>
On Mon, Oct 17, 2011 at 01:31:25PM +0100, Jonathan Cameron wrote:
> On 10/17/11 13:08, Mark Brown wrote:
> > On Mon, Oct 17, 2011 at 12:32:25PM +0100, Jonathan Cameron wrote:
Your mails would be much more legible if you'd leave blank lines between
paragraphs and if you could wrap your mails at less than 80 columns.
> >> (have insist on indexing even with named channels because it is needed as
> >> events codes don't want to carry a string.).
> > This is orthogonal to the request interface, though.
> No it isn't - because it will effect the numbering of the gneral purpose ones.
I don't think the numbers reported in events should be forced to be
directly associated with the numbers (consider the case with mixes of
high sensitivity and low sensitivity inputs for example).
> >> Not hard wired so to my mind these are just general purpose temperature inputs.
> >> Hence naming doesn't make sense (at least not outside of board file or DT).
> > No, they're hard wired - like I say they're wired to a particular place.
> If it isn't physically in the pmic package then it doesn't belong in the driver.
In the case of the die temperature measurement things are obviously
entirely within the PMIC. In the case of battery temperature monitoring
the actual sensor is outside the device but it's fixed function due to
cross connection with the autonomous control logic for the battery
chargers.
> Note the numbering is still going to be Linux specific just within a given type
> of channel. ADC channels regularly have completely inconsistent (and/or stupid) names
> in device data sheets.
> 0...4
> 1...5
> AUXA....AUXD
> TEMP_EXT1...TEMP_EXT5 (all of which are just normal adc channels that some
> designer decided would be used only for connecting analog temperature sensors.)
None of those look at all unreasonable?
> All of these get mapped to 0...4. Anything else leads to totally unpredictable
> guessing games when trying to find the channel.
I dunno, things like introducing an offset of 1 into the numbers the
datasheet uses can be pretty painful to work with - it's not obvious
when looking at the code that you've got the number wrong. With the
PMICs it's been really helpful to do things like map the LDOs and DCDCs
separately even though at the level where you're gluing things together
there's no meaningful difference.
Once we're running it's a different story, it's just when expressing the
wiring to the system that I'm worried.
next prev parent reply other threads:[~2011-10-17 12:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 11:43 [PATCH RFC] IIO: Proof of concept in kernel interface Jonathan Cameron
2011-10-11 11:43 ` [PATCH] staging:iio:proof " Jonathan Cameron
2011-10-13 14:32 ` Mark Brown
2011-10-13 14:46 ` Jonathan Cameron
2011-10-13 20:44 ` Mark Brown
2011-10-14 15:59 ` Jonathan Cameron
2011-10-14 19:33 ` Mark Brown
2011-10-16 18:45 ` Linus Walleij
2011-10-17 9:39 ` Mark Brown
2011-10-17 9:44 ` Jonathan Cameron
2011-10-17 9:43 ` Jonathan Cameron
2011-10-17 10:19 ` Mark Brown
2011-10-17 10:32 ` Jonathan Cameron
2011-10-17 10:46 ` Mark Brown
2011-10-17 11:13 ` Jonathan Cameron
2011-10-17 11:18 ` Mark Brown
2011-10-17 11:32 ` Jonathan Cameron
2011-10-17 12:08 ` Mark Brown
2011-10-17 12:31 ` Jonathan Cameron
2011-10-17 12:48 ` Mark Brown [this message]
2011-10-17 13:03 ` Jonathan Cameron
2011-10-17 13:55 ` Mark Brown
2011-10-17 14:05 ` Jonathan Cameron
2011-10-17 13:55 ` Linus Walleij
2011-10-17 14:01 ` Jonathan Cameron
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=20111017124807.GD27266@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=jic23@cam.ac.uk \
--cc=linus.ml.walleij@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zdevai@gmail.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;
as well as URLs for NNTP newsgroup(s).