From: Ludovic Desroches <ludovic.desroches@atmel.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Ludovic Desroches <ludovic.desroches@atmel.com>,
<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <nicolas.ferre@atmel.com>
Subject: Re: [PATCH v2 1/2] iio: core: introduce IIO_CHAN_INFO_SIGNED
Date: Thu, 10 Mar 2016 14:23:51 +0100 [thread overview]
Message-ID: <20160310132351.GO2690@odux.rfo.atmel.com> (raw)
In-Reply-To: <56E08FD5.4060701@kernel.org>
On Wed, Mar 09, 2016 at 09:04:21PM +0000, Jonathan Cameron wrote:
> On 07/03/16 20:09, Lars-Peter Clausen wrote:
> > On 03/07/2016 03:29 PM, Ludovic Desroches wrote:
> >> The same channel can be used to perform a signed or an unsigned
> >> conversion. Add a new infomask element to be able to select the type of
> >> conversion wanted: a raw one or a signed raw one.
> >
> > If this is the difference between offset binary and two's complement then it
> > makes no sense to expose this at this level. Both are the same number just
> > in a different representation and converting between them is cheap. A few
> > magnitudes cheaper than reading the result over sysfs. So, if your device
> > supports both, just pick one.
> >
> > For the buffered interface it may make sense to expose this, since the per
> > sample overhead is a lot lower. But still doing the conversion should be
> > cheap enough that it does not really matter. Before this is implemented I'd
> > like to see hard performance numbers that this actually makes a difference.
> >
> > - Lars
> >
> Definitely looking for more detail on this. I'd missed we were talking simply
> about representation (which is also how I read 62.6.6 Conversion Results Format
> in the datasheet). Not entirely sure what I imagined the difference between
> signed and unsigned output would be!
You are both right, it is only about representation. I have asked hardware guys
why they add this feature. They told me it is for convenience and because some
librairies need signed results.
Regards
Ludovic
next prev parent reply other threads:[~2016-03-10 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 14:29 [PATCH v2 0/2] iio: add support for signed conversions Ludovic Desroches
2016-03-07 14:29 ` [PATCH v2 1/2] iio: core: introduce IIO_CHAN_INFO_SIGNED Ludovic Desroches
2016-03-07 20:09 ` Lars-Peter Clausen
2016-03-09 21:04 ` Jonathan Cameron
2016-03-10 13:23 ` Ludovic Desroches [this message]
2016-03-07 14:29 ` [PATCH v2 2/2] iio:adc:at91-sama5d2: add support for signed conversion Ludovic Desroches
2016-03-07 20:04 ` 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=20160310132351.GO2690@odux.rfo.atmel.com \
--to=ludovic.desroches@atmel.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@atmel.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).