public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mugunthan V N <mugunthanvnm@ti.com>
To: Jonathan Cameron <jic23@kernel.org>, <linux-iio@vger.kernel.org>
Cc: Tony Lindgren <tony@atomide.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Russell King <linux@armlinux.org.uk>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Lee Jones <lee.jones@linaro.org>, Vignesh R <vigneshr@ti.com>,
	"Andrew F . Davis" <afd@ti.com>, <linux-omap@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, Sekhar Nori <nsekhar@ti.com>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>
Subject: Re: [PATCH 0/4] Add DMA support for ti_am335x_adc driver
Date: Thu, 29 Sep 2016 18:31:30 +0530	[thread overview]
Message-ID: <ff19f584-e4e5-61ff-046d-68ec37ab51c2@ti.com> (raw)
In-Reply-To: <22588f2d-d0de-7911-35ed-92094f7dd28d@kernel.org>

On Sunday 25 September 2016 03:11 PM, Jonathan Cameron wrote:
> On 21/09/16 17:11, Mugunthan V N wrote:
>> > The ADC has a 64 work depth fifo length which holds the ADC data
>> > till the CPU reads. So when a user program needs a large ADC data
>> > to operate on, then it has to do multiple reads to get its
>> > buffer. Currently if the application asks for 4 samples per
>> > channel with all 8 channels are enabled, kernel can provide only
>> > 3 samples per channel when all 8 channels are enabled (logs at
>> > [1]). So with DMA support user can request for large number of
>> > samples at a time (logs at [2]).
>> > 
>> > Tested the patch on AM437x-gp-evm and AM335x Boneblack with the
>> > patch [3] to enable ADC and pushed a branch for testing [4]
>> > 
>> > [1] - http://pastebin.ubuntu.com/23211490/
>> > [2] - http://pastebin.ubuntu.com/23211492/
>> > [3] - http://pastebin.ubuntu.com/23211494/
>> > [4] - git://git.ti.com/~mugunthanvnm/ti-linux-kernel/linux.git iio-dma
> Just curious.  How fast is the ADC sampling at in these?  Never that
> obvious for this driver!
> 
> I'm also curious as to whether you started to hit the limits of the
> kfifo based interface.  Might be worth considering adding alternative
> support for the dma buffers interface which is obviously much lower
> overhead.
> 
> Good to have this work prior to that as the kfifo stuff is somewhat
> easier to use.

Currently ADC clock is 3MHz, which can produce a data rate of 225KBps
per channel with no open delay and no averaging of samples. So when all
8 Channels are enables the data rate will be 1.75MBps

ADC can be operated at 24MHz, which can generate a data rate of 28MBps
with all 8 channels enabled and no open delay and averaging, but our
target is to get 800K samples per second per channel which has a data
rate of 12.5MBps

I think with this data rate, DMA will be the best option to implement
without any data loss and less cpu overload to read the ADC samples.

Regards
Mugunthan V N

  reply	other threads:[~2016-09-29 13:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 16:11 [PATCH 0/4] Add DMA support for ti_am335x_adc driver Mugunthan V N
2016-09-21 16:11 ` [PATCH 1/4] mfd: ti_am335x_tscadc: store physical address Mugunthan V N
2016-09-27 19:40   ` Lee Jones
2016-09-30  8:43     ` Mugunthan V N
2016-10-26 12:17       ` Lee Jones
2016-10-30 17:05         ` Jonathan Cameron
2016-10-31  8:16           ` Lee Jones
2016-11-05 17:45             ` Jonathan Cameron
2016-09-21 16:11 ` [PATCH 2/4] drivers: iio: ti_am335x_adc: add dma support Mugunthan V N
2016-09-22  6:18   ` Vignesh R
2016-09-22 10:45     ` Mugunthan V N
2016-09-22 11:16       ` Peter Ujfalusi
2016-09-22  7:20   ` Peter Ujfalusi
2016-09-22 10:56     ` Mugunthan V N
2016-09-21 16:11 ` [PATCH 3/4] ARM: dts: am33xx: add DMA properties for tscadc Mugunthan V N
2016-09-21 16:11 ` [PATCH 4/4] ARM: dts: am4372: " Mugunthan V N
2016-09-25  9:41 ` [PATCH 0/4] Add DMA support for ti_am335x_adc driver Jonathan Cameron
2016-09-29 13:01   ` Mugunthan V N [this message]
2016-09-30  3:37     ` John Syne

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=ff19f584-e4e5-61ff-046d-68ec37ab51c2@ti.com \
    --to=mugunthanvnm@ti.com \
    --cc=afd@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=nsekhar@ti.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=tony@atomide.com \
    --cc=vigneshr@ti.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