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

From Lars-Peter Clausen <lars@metafoo.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] iio: core: introduce IIO_CHAN_INFO_SIGNED
Date 2016-03-07 21:10 +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>
Organization linux.* mail to news gateway

Show all headers | 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