linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: "Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: getting started w/ iio driver
Date: Fri, 10 Nov 2017 23:50:57 +0000	[thread overview]
Message-ID: <20171110235057.00005cd3@huawei.com> (raw)
In-Reply-To: <788bbd7f-28da-00b0-4008-a087373147b6@metux.net>

On Sat, 4 Nov 2017 21:51:34 +0100
"Enrico Weigelt, metux IT consult" <info@metux.net> wrote:

> On 04.11.2017 21:38, Jonathan Cameron wrote:
> 
> >> How should I implement the sampling rate setting w/ separate devices ?
> >> Maybe some master-slave concept where settings on the master
> >> automatically affect the slaves ?  
> > 
> > Yes it will be a bit ugly. Probably do it as a set of peers where writing any will change them all.  

Sorry, been a busy week - now have beer and am on right side of airport security ;)
> 
> Ok. By the way: how to set the sampling-rate via iio ?
> Is there a callback or device field for that ?
Yes - the raw_write callback will do it but you will also need to
add the IIO_CHAN_SPEC_SAMP_FREQ bit to the appropriate 
infomask_shared_by*
> 

> where should i tell the adc to start capture w/ ?
> in pre- or post-enable buffer ops ?

Conceptually in the post-enable.  The pre / post divide is
rather vague now as it the original plan to do it nice and cleanly
was flawed by some race conditions.  Now they both occur in a very
similar state...
> 
> 
> --mtx
> 
> 


  reply	other threads:[~2017-11-10 23:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4d347c06-b53a-de3d-f8f1-8e05684a4ebd@metux.net>
     [not found] ` <20171103071702.00005355@huawei.com>
     [not found]   ` <d470edd4-a67f-7e1f-91b6-41ae22aea762@metux.net>
     [not found]     ` <53418B0A3A5CEF439F1108674285B0A9014D15CC@lhreml523-mbs.china.huawei.com>
     [not found]       ` <be9b39c0-01c1-7c57-3103-b04727dff857@metux.net>
     [not found]         ` <38963561-8108-40CE-9B45-76672A860F0B@jic23.retrosnub.co.uk>
2017-11-04 20:51           ` getting started w/ iio driver Enrico Weigelt, metux IT consult
2017-11-10 23:50             ` Jonathan Cameron [this message]
2017-11-05  6:28 ` Phil Reid

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=20171110235057.00005cd3@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=info@metux.net \
    --cc=jic23@jic23.retrosnub.co.uk \
    --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 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).