linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zubair Lutfullah :" <zubair.lutfullah@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Zubair Lutfullah:  zubair.lutfullah@gmail.com,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org, gregkh@linuxfoundation.org,
	Russ.Dill@ti.com
Subject: Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling and trigger support
Date: Sun, 4 Aug 2013 16:42:31 +0100	[thread overview]
Message-ID: <20130804154230.GA32073@gmail.com> (raw)
In-Reply-To: <51FE8107.4020201@kernel.org>

On Sun, Aug 04, 2013 at 05:27:51PM +0100, Jonathan Cameron wrote:
> > 
> > The trigger here is simply to give certain functionality like an oscilloscope 
> > trigger. The control is given to the userspace application via IIO triggers 
> > (so sysfs/gpio/timer etc can be used)
> > 
> > A buffer of samples is read on one trigger.
> That buffer is filled continuously?

Yes.
Very similar to an oscilloscope trigger.

Upon receiving a trigger, enabled channels are sampled continuously and 
pushed to userspace via iio_push_to_buffer

> > 
> > generic_buffer.c reads the samples with a simple sysfs trigger.
> > 
> I'm not sure what the point of the sysfs trigger here is.  Why not
> just push from the fifo directly out when a watershed interrupt occurs
> on the hardware buffer?
> 

So that any IIO trigger can be used to initiate sampling. sysfs/gpio/timer etc.
Also in this way, generic buffer.c can be used without patching it to remove
trigger checks.

What you state is exactly what happens. When the HW fifo threshold is reached,
the samples are read and sent to userspace via iio_push_to_buffers.

The trigger is used *only* to initiate the process.

> > So.
> > Additional description in the git log only?
> > 
> > I'll add following in log message.
> > "Any IIO trigger can be used to trigger driver to read a buffer
> > of samples from enabled channels."

      parent reply	other threads:[~2013-08-04 15:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26 23:51 [PATCH 0/2] iio: input: ti_am335x_adc: Add continuous sampling and trigger support round 3 Zubair Lutfullah
2013-07-26 23:51 ` [PATCH 1/2] input: ti_tsc: Enable shared IRQ for TSC Zubair Lutfullah
2013-08-04 11:08   ` Jonathan Cameron
2013-08-05 16:12     ` Dmitry Torokhov
2013-08-05 17:02       ` Zubair Lutfullah :
2013-08-05 17:40         ` Dmitry Torokhov
2013-08-05 19:21           ` Zubair Lutfullah :
2013-08-05 22:42         ` Russ Dill
2013-07-26 23:51 ` [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling and trigger support Zubair Lutfullah
2013-08-04 11:05   ` Jonathan Cameron
2013-08-04 13:11     ` Zubair Lutfullah :
     [not found]       ` <51FE8107.4020201@kernel.org>
2013-08-04 15:42         ` Zubair Lutfullah : [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=20130804154230.GA32073@gmail.com \
    --to=zubair.lutfullah@gmail.com \
    --cc=Russ.Dill@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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 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).