linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Daniel Baluta <daniel.baluta@intel.com>,
	Jonathan Cameron <jic23@kernel.org>
Cc: Vlad Dogaru <vlad.dogaru@intel.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 0/4] Add valid sample channel
Date: Mon, 01 Dec 2014 21:06:06 +0100	[thread overview]
Message-ID: <547CCA2E.8010705@metafoo.de> (raw)
In-Reply-To: <CAEnQRZBURtX3=d9-sy1AvgipgqcYTiiL5TCjaSwMkeJd-XYh0w@mail.gmail.com>

On 11/26/2014 01:58 PM, Daniel Baluta wrote:
> On Tue, Nov 25, 2014 at 7:29 PM, Jonathan Cameron <jic23@kernel.org> wrote:
>>
>>
>> On November 25, 2014 5:00:11 PM GMT+00:00, Lars-Peter Clausen <lars@metafoo.de> wrote:
>>> On 11/25/2014 05:55 PM, Daniel Baluta wrote:
>>>> On Tue, Nov 25, 2014 at 6:36 PM, Lars-Peter Clausen <lars@metafoo.de>
>>> wrote:
>>>>> On 11/25/2014 01:48 PM, Vlad Dogaru wrote:
>>>>>>
>>>>>> This is an attempt to address the problem of buffering in devices
>>> which
>>>>>> have
>>>>>> different scan frequencies for different channels.
>>>>>
>>>>>
>>>>> Will these frequencies still be related or completely arbitrary?
>>>>
>>>> For Kionix KMX61 we have the same set of frequencies for
>>>> accelerometer and magnetometer (12.5, 25, 50, 100 Hz, etc)
>>>> but for example at some point accel can be configured with 100 Hz
>>>> and magnetometer with 12.5Hz.
>>>>
>>>> Does this matter?
>>>
>>> I'm wondering if it makes more sense to register multiple buffers or
>>> devices
>>> if the frequencies are completely unrelated. E.g. in the KMX61 case it
>>> looks
>>> as if its simply two logical devices in the same physical package.
>
> I think this makes a lot of sense for kmx61 and offers a cleaner
> interface to user space.
>
>>>
>>> - Lars
>> That is how we have handled this so far.
>> Sometimes we have separate iio_devices for
>> the logical functions e.g. hid-sensors and sometimes just multiple buffers.. I am
>>   struggling to find it now but one of the ADC drivers had a insanely complex nest
>>   sampling arrangement requiring 8 buffers. Final driver might have been simplified though...  We might still need a few tweaks
>>   for multiple buffers not to having naming clashes....  Moving house so only have phone to hand!
>
> I looked into iio/adc/ and iio/imu/ but couldn't find any driver which
> has one IIO device  and multiple buffers. I don't see how this can
> work :).
>
> User space application will read /dev/iio:deviceX to get data
> samples. How would they know the source of the data samples?

What exactly do you mean by source?

>
> Let me know where is the source code for the 8 buffers ADC driver,
> I am very curious about the implementation :).

I think that one never made it into upstream or got reworked before.

- Lars


  reply	other threads:[~2014-12-01 20:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 12:48 [PATCH 0/4] Add valid sample channel Vlad Dogaru
2014-11-25 12:48 ` [PATCH 1/4] iio: dummy: set scan_index for unbuffered channels Vlad Dogaru
2014-11-25 16:11   ` Daniel Baluta
2014-12-12 11:48     ` Jonathan Cameron
2014-11-25 12:48 ` [PATCH 2/4] iio: ensure scan index is unique at buffer register Vlad Dogaru
2014-12-06 20:19   ` Hartmut Knaack
2014-12-12 11:50     ` Jonathan Cameron
2014-11-25 12:48 ` [RFC PATCH 3/4] iio: add valid sample channel Vlad Dogaru
2014-11-25 12:48 ` [RFC PATCH 4/4] iio: illustrate the use of a " Vlad Dogaru
2014-11-25 16:36 ` [PATCH 0/4] Add " Lars-Peter Clausen
2014-11-25 16:55   ` Daniel Baluta
2014-11-25 17:00     ` Lars-Peter Clausen
2014-11-25 17:29       ` Jonathan Cameron
2014-11-25 18:27         ` Octavian Purdila
2014-11-25 18:53           ` Lars-Peter Clausen
2014-11-26 12:58         ` Daniel Baluta
2014-12-01 20:06           ` Lars-Peter Clausen [this message]
2014-12-01 20:46             ` Daniel Baluta
2014-12-01 20:51               ` Lars-Peter Clausen
2014-12-01 21:03                 ` Daniel Baluta

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=547CCA2E.8010705@metafoo.de \
    --to=lars@metafoo.de \
    --cc=daniel.baluta@intel.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=vlad.dogaru@intel.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).