All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: John Syn <john3909@gmail.com>
Cc: linux-iio@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Matt Flax <flatmax@flatmax.org>
Subject: Re: DMA sampling and IIO
Date: Thu, 06 Feb 2014 10:56:43 +0100	[thread overview]
Message-ID: <52F35C5B.7080409@metafoo.de> (raw)
In-Reply-To: <CF17C5B7.1940A%john3909@gmail.com>

On 02/05/2014 07:42 PM, John Syn wrote:
> I¹m working on a project that uses the ADE7878 Energy Measurement part
> from Analog Devices. Currently there is an IIO device driver in the
> staging/iio/meter folder, but I would like to extend this by adding high
> speed sampling of the AC waveforms. The ADE7878 will continuously output
> samples (8 Khz) of the voltage/current waveforms via an I2S interface. I
> plan to use DMA to store these values in a buffer and then use IIO Ring
> Buffer to access these values from User Space.
>
> Was this considered in the IIO framework and does anyone have any
> suggestions on how I might proceed?

Hi,

We do have patches for better integration of DMA (especially for high speed 
devices) into the IIO framework[1]. This is not yet upstream since it is 
still a bit WIP, but I'm confident that it will find it's way into upstream 
soon. The patches are pretty isolated, so they can easily be applied on top 
of a upstream tree.

But with DMA you'll need a host component that supports this. The ADE7878 
driver on it's own can not do any DMA since it doesn't know how it is 
connected to the host system. I2S is typically used for audio and all I2S 
host driver reside in the audio subsystem. The tricky part will now be - if 
there is already a I2S driver for your host system - how to bridge the audio 
driver with the ADE7878 driver and expose the result as a DMA capable IIO 
device.

- Lars

[1] 
https://github.com/analogdevicesinc/linux/commit/4edb9c9cbaf88047355c86e421690262406d5eae


  reply	other threads:[~2014-02-06  9:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 18:42 DMA sampling and IIO John Syn
2014-02-06  9:56 ` Lars-Peter Clausen [this message]
2014-02-06 19:43   ` John Syn
2014-02-06 21:15     ` Lars-Peter Clausen
2014-02-07 13:20       ` Mark Brown
2014-02-07 22:19         ` John Syn
2014-09-10 22:19         ` John Syn
2014-09-10 22:43         ` John Syn
2014-09-17 19:53           ` Mark Brown
2014-09-18  4:06             ` John Syn
2014-02-06 20:53   ` Alessandro Rubini
2014-02-06 21:02     ` Lars-Peter Clausen
2014-02-06 21:16       ` Alessandro Rubini
2014-02-06 21:38         ` Lars-Peter Clausen
2014-02-07 18:18           ` John Syn

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=52F35C5B.7080409@metafoo.de \
    --to=lars@metafoo.de \
    --cc=broonie@kernel.org \
    --cc=flatmax@flatmax.org \
    --cc=john3909@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.