Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1351947

Re: [PATCH v2 1/2] iio: core: introduce IIO_CHAN_INFO_SIGNED

Path csiph.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod
From Lars-Peter Clausen <lars@metafoo.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] iio: core: introduce IIO_CHAN_INFO_SIGNED
Date Mon, 07 Mar 2016 21:10:02 +0100
Message-ID <ra9DA-7xE-9@gated-at.bofh.it> (permalink)
References <ra4ky-3XX-3@gated-at.bofh.it> <ra4uf-42s-51@gated-at.bofh.it>
X-Synserver-Trustedsrc 1
X-Synserver-Authuser lars@metafoo.de
X-Synserver-Ppid 18072
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0
MIME-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 17
Organization linux.* mail to news gateway
X-Original-Cc linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, nicolas.ferre@atmel.com
X-Original-Date Mon, 7 Mar 2016 21:09:32 +0100
X-Original-Message-ID <56DDDFFC.5010100@metafoo.de>
X-Original-References <1457360997-29179-1-git-send-email-ludovic.desroches@atmel.com> <1457360997-29179-2-git-send-email-ludovic.desroches@atmel.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1351947

Show key headers only | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] iio: add support for signed conversions Ludovic Desroches <ludovic.desroches@atmel.com> - 2016-03-07 15:30 +0100
  [PATCH v2 2/2] iio:adc:at91-sama5d2: add support for signed conversion Ludovic Desroches <ludovic.desroches@atmel.com> - 2016-03-07 15:40 +0100
    Re: [PATCH v2 2/2] iio:adc:at91-sama5d2: add support for signed  conversion Lars-Peter Clausen <lars@metafoo.de> - 2016-03-07 21:20 +0100
  [PATCH v2 1/2] iio: core: introduce IIO_CHAN_INFO_SIGNED Ludovic Desroches <ludovic.desroches@atmel.com> - 2016-03-07 15:40 +0100
    Re: [PATCH v2 1/2] iio: core: introduce IIO_CHAN_INFO_SIGNED Lars-Peter Clausen <lars@metafoo.de> - 2016-03-07 21:10 +0100
      Re: [PATCH v2 1/2] iio: core: introduce IIO_CHAN_INFO_SIGNED Jonathan Cameron <jic23@kernel.org> - 2016-03-09 22:10 +0100
        Re: [PATCH v2 1/2] iio: core: introduce IIO_CHAN_INFO_SIGNED Ludovic Desroches <ludovic.desroches@atmel.com> - 2016-03-10 14:30 +0100

csiph-web