From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Hector Palacios <hector.palacios@digi.com>,
linux-iio@vger.kernel.org, Marek Vasut <marex@denx.de>,
"fabio.estevam@freescale.com" <fabio.estevam@freescale.com>
Subject: Re: Accessing specific hardware features of mxs-lradc
Date: Tue, 02 Jul 2013 15:28:49 +0200 [thread overview]
Message-ID: <51D2D591.4040101@free-electrons.com> (raw)
In-Reply-To: <51D2CE6A.7040103@metafoo.de>
On 02/07/2013 14:58, Lars-Peter Clausen wrote:
> On 07/02/2013 12:49 PM, Hector Palacios wrote:
>> Greetings,
>>
>> The mxs-lradc has some hardware specific features like the DIVIDE_BY_TWO (an
>> analog divide by two circuit that can be activated per channel).
>> This is not currently implemented in the driver and I was wondering what would
>> be the way to expose and control such setting. A specific sysfs entry? Somehow
>> through the device tree?
>>
>> Is there any example of how to control a hw-specific feature in other similar
>> iio drivers?
>>
>
> This sounds as if the channel scale is programmable. There are quite a few
> drivers for devices which have similar features, just make the scale property
> writable and provide a scale_available.
>
I was looking at that yesterday as I had to had a scale for the
temperature sensors. You'll have to be careful because the maximum
measured voltage when DIVIDE_BY_TWO is not set is 1.85V and when it is
set, it becomes VDDIO - 50mv.
Also, scaling for quite a lot of channels is fixed. You'll also get
channels with a fixed divider that can take DIVIDE_BY_TWO. That is quite
a mess ;)
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2013-07-02 13:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 10:49 Accessing specific hardware features of mxs-lradc Hector Palacios
2013-07-02 12:06 ` Marek Vasut
2013-07-02 12:58 ` Lars-Peter Clausen
2013-07-02 13:28 ` Alexandre Belloni [this message]
2013-07-02 14:55 ` Hector Palacios
2013-07-02 15:21 ` Lars-Peter Clausen
2013-07-02 15:41 ` Lars-Peter Clausen
2013-07-02 15:45 ` Alexandre Belloni
2013-07-02 15:55 ` Lars-Peter Clausen
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=51D2D591.4040101@free-electrons.com \
--to=alexandre.belloni@free-electrons.com \
--cc=fabio.estevam@freescale.com \
--cc=hector.palacios@digi.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=marex@denx.de \
/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.