All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zubair Lutfullah :" <zubair.lutfullah@gmail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Zubair Lutfullah <zubair.lutfullah@gmail.com>,
	jic23@cam.ac.uk, dmitry.torokhov@gmail.com,
	linux-iio@vger.kernel.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	Russ.Dill@ti.com
Subject: Re: [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support
Date: Tue, 20 Aug 2013 17:26:58 +0100	[thread overview]
Message-ID: <20130820162657.GA6776@gmail.com> (raw)
In-Reply-To: <20130819171238.GA31610@linutronix.de>

On Mon, Aug 19, 2013 at 07:12:38PM +0200, Sebastian Andrzej Siewior wrote:
> * Zubair Lutfullah | 2013-08-13 21:05:03 [+0100]:
> 
> >diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> >index 3ceac3e..0d7e313 100644
> >--- a/drivers/iio/adc/ti_am335x_adc.c
> >+++ b/drivers/iio/adc/ti_am335x_adc.c
> …
> >+static irqreturn_t tiadc_irq(int irq, void *private)
> >+{
> …
> >+		wake_up_interruptible(&adc_dev->wq_data_avail);
> …
> >+}
> …
> >+static irqreturn_t tiadc_trigger_h(int irq, void *p)
> >+{
> …
> >+	schedule_work(&adc_dev->poll_work);
> …
> >+}
> …
> >+static void tiadc_adc_work(struct work_struct *work_s)
> >+{
> …
> >+		wait_event_interruptible(adc_dev->wq_data_avail,
> >+					(adc_dev->data_avail == 1));
> …
> >+}
> 
> This is not very nice. The problem is that you might sleep in a
> workqueue and so the other jobs will wait until you are done. I'm think
This will change to a different style.

> I'm looking into DMA support for this so once your code is working it
> should be possible to switch to DMA instead reading byte wise from the
> fifo.
Great.

> How did you test the whole thing? Do you have a test program which
> selects a few sources and reads them in continuous mode?
> 
generic_buffer.c runs for this for sysfs trigger.. 
However. If you follow the other thread. 
This is obsolete and trigger style is changing to a driver trigger.

I'll update when I'm done.

Thanks
ZubairLK

WARNING: multiple messages have this Message-ID (diff)
From: "Zubair Lutfullah :" <zubair.lutfullah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Sebastian Andrzej Siewior
	<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Zubair Lutfullah
	<zubair.lutfullah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	Russ.Dill-l0cyMroinI0@public.gmane.org
Subject: Re: [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support
Date: Tue, 20 Aug 2013 17:26:58 +0100	[thread overview]
Message-ID: <20130820162657.GA6776@gmail.com> (raw)
In-Reply-To: <20130819171238.GA31610-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>

On Mon, Aug 19, 2013 at 07:12:38PM +0200, Sebastian Andrzej Siewior wrote:
> * Zubair Lutfullah | 2013-08-13 21:05:03 [+0100]:
> 
> >diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> >index 3ceac3e..0d7e313 100644
> >--- a/drivers/iio/adc/ti_am335x_adc.c
> >+++ b/drivers/iio/adc/ti_am335x_adc.c
> …
> >+static irqreturn_t tiadc_irq(int irq, void *private)
> >+{
> …
> >+		wake_up_interruptible(&adc_dev->wq_data_avail);
> …
> >+}
> …
> >+static irqreturn_t tiadc_trigger_h(int irq, void *p)
> >+{
> …
> >+	schedule_work(&adc_dev->poll_work);
> …
> >+}
> …
> >+static void tiadc_adc_work(struct work_struct *work_s)
> >+{
> …
> >+		wait_event_interruptible(adc_dev->wq_data_avail,
> >+					(adc_dev->data_avail == 1));
> …
> >+}
> 
> This is not very nice. The problem is that you might sleep in a
> workqueue and so the other jobs will wait until you are done. I'm think
This will change to a different style.

> I'm looking into DMA support for this so once your code is working it
> should be possible to switch to DMA instead reading byte wise from the
> fifo.
Great.

> How did you test the whole thing? Do you have a test program which
> selects a few sources and reads them in continuous mode?
> 
generic_buffer.c runs for this for sysfs trigger.. 
However. If you follow the other thread. 
This is obsolete and trigger style is changing to a driver trigger.

I'll update when I'm done.

Thanks
ZubairLK

  reply	other threads:[~2013-08-20 16:27 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 20:04 [PATCH 0/4] iio: input: ti_am335x_adc: Add continuous sampling support round 5 Zubair Lutfullah
2013-08-13 20:05 ` [PATCH 1/4] input: ti_am335x_tsc: correct step mask update after IRQ Zubair Lutfullah
2013-08-13 20:05   ` Zubair Lutfullah
2013-08-13 20:05 ` [PATCH 2/4] input: ti_am335x_tsc: Increase sequencer delay time Zubair Lutfullah
2013-08-13 20:05 ` [PATCH 3/4] input: ti_am335x_tsc: Enable shared IRQ for TSC, add overrun and underflow checks Zubair Lutfullah
2013-08-13 20:05   ` Zubair Lutfullah
2013-08-13 20:05 ` [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support Zubair Lutfullah
2013-08-15 11:43   ` Jonathan Cameron
2013-08-15 11:43     ` Jonathan Cameron
2013-08-16 10:07     ` Sebastian Andrzej Siewior
2013-08-16 10:07       ` Sebastian Andrzej Siewior
2013-08-16 10:17       ` Sebastian Andrzej Siewior
2013-08-16 10:17         ` Sebastian Andrzej Siewior
2013-08-16 11:33       ` Jonathan Cameron
2013-08-16 11:33         ` Jonathan Cameron
2013-08-16 10:46         ` Sebastian Andrzej Siewior
2013-08-16 21:21           ` Zubair Lutfullah :
2013-08-17  8:58     ` Zubair Lutfullah :
2013-08-17  8:58       ` Zubair Lutfullah :
     [not found]       ` <520F9395.3050900@kernel.org>
2013-08-17 18:51         ` Zubair Lutfullah :
2013-08-16 12:53   ` Sebastian Andrzej Siewior
2013-08-16 12:53     ` Sebastian Andrzej Siewior
2013-08-16 21:18     ` Zubair Lutfullah :
2013-08-16 13:25   ` Sebastian Andrzej Siewior
2013-08-16 13:25     ` Sebastian Andrzej Siewior
2013-08-16 21:13     ` Zubair Lutfullah :
2013-08-16 14:59   ` Sebastian Andrzej Siewior
2013-08-16 14:59     ` Sebastian Andrzej Siewior
2013-08-16 21:10     ` Zubair Lutfullah :
2013-08-19 17:12   ` Sebastian Andrzej Siewior
2013-08-19 17:12     ` Sebastian Andrzej Siewior
2013-08-20 16:26     ` Zubair Lutfullah : [this message]
2013-08-20 16:26       ` Zubair Lutfullah :
2013-08-14 18:57 ` [PATCH 0/4] iio: input: ti_am335x_adc: Add continuous sampling support round 5 Jonathan Cameron
2013-08-14 18:05   ` Sebastian Andrzej Siewior
2013-08-16 21:23   ` Zubair Lutfullah :
  -- strict thread matches above, loose matches on Subject: below --
2013-08-13 16:48 [PATCH 0/4] iio: input: ti_am335x_adc: Add continuous sampling support round 4 Zubair Lutfullah
2013-08-13 16:48 ` [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support Zubair Lutfullah
2013-08-13 17:05   ` Lee Jones
2013-08-13 17:05     ` Lee Jones

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=20130820162657.GA6776@gmail.com \
    --to=zubair.lutfullah@gmail.com \
    --cc=Russ.Dill@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@cam.ac.uk \
    --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 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.