All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Denis Ciocca <denis.ciocca@gmail.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: Fwd: iio_trigger doesn't work
Date: Thu, 20 Sep 2012 15:12:43 +0200	[thread overview]
Message-ID: <505B164B.1010002@metafoo.de> (raw)
In-Reply-To: <CAEE_umodNxVNqm0NiCvPDTaouL2GsCyd+iLqrAOGcegWE6ocbw@mail.gmail.com>

On 09/20/2012 02:44 PM, Denis Ciocca wrote:
>> Yes, you need a buffer. The trigger won't be activated until the buffer is
>> active. To activate the buffer you need to select at least one scan element
>> in the scan_elements subfolder of you IIO device, then set the buffer size
>> by writing to buffer/length and finally write a 1 to buffer/enable. Now you
>> should see your acc_trigger_handler being called.
> 
> I don't understand what you mean with:
> "select at least one scan element in the scan_elements subfolder"
> I have seen the adis16240 accelerometer driver for example but I don't saw
> anything about scan element. Can you be more specific?

So each channel has a scan index. And for each channel you can enable
whether the channel should be sampled in buffered mode or not. There is a
sysfs file for each channel which allows you to do this in the scan_elements
subfolder. In order to start sampling you have to enable at least one
scan_element by writing a 1 to its enable attribute.

- Lars

      reply	other threads:[~2012-09-20 13:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEE_umptNVPOYeTANC4mtAo8AxizmFkrFoa0eLGoLFtTRgWzng@mail.gmail.com>
2012-09-19 15:57 ` Fwd: iio_trigger doesn't work Denis Ciocca
2012-09-19 16:14   ` Jonathan Cameron
2012-09-19 17:13   ` Lars-Peter Clausen
2012-09-20  7:43     ` Denis Ciocca
2012-09-20 11:44       ` Lars-Peter Clausen
2012-09-20 12:44         ` Denis Ciocca
2012-09-20 13:12           ` Lars-Peter Clausen [this message]

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=505B164B.1010002@metafoo.de \
    --to=lars@metafoo.de \
    --cc=denis.ciocca@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    /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.