From: Jonathan Cameron <jic23@kernel.org>
To: Armando Visconti <armando.visconti@st.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
Lorenzo BIANCONI <lorenzo.bianconi@st.com>,
Denis CIOCCA <denis.ciocca@st.com>
Subject: Re: question about IIO buffer interface
Date: Sun, 18 Sep 2016 11:54:35 +0100 [thread overview]
Message-ID: <c1c5978a-af55-e0ef-01ae-8df8b313c49d@kernel.org> (raw)
In-Reply-To: <19a0921b-bc70-bfaa-cbe7-97cf3e37faa5@st.com>
On 16/09/16 16:03, Armando Visconti wrote:
> Hello Jonathan,
>
> Thx for the very long explanation.
>
>
>>
>> Anyhow, the philosophy was:
>>
>> preenable -> stuff related to getting ready for buffered operation.
>> This might be as simple as turning off something else that prevents
>> buffered operation. Often this is simply not provided as there
>> is nothing useful to be done.
>>
>> update_scan_mode -> get the scan mode set up right for all the buffers
>> being feed by the iio_push_to_buffers calls.
>>
>> postenable -> Actually start the flow of data now all the flags are
>> lined up to say we are enabled. So in a typical triggered-buffer
>> case call iio_trigger_attach_poll_func
>>
>
> Usually our drivers use prenable() for starting the data flow
> and postdisable() to stop it.
>
> Do you think it is a mistake?
> Or acceptable?
If you don't have a reason to use the update_scan_mode callback
then it doesn't really matter. Conceptually I'd do it postenable and
predisable, but I'm not that fussed!
Jonathan
>
>>
>> For the disable side:
>> predisable unwinds postenable and postdisable typically unwinds
>> preenable.
>>
>
> Yes, that's clear.
>
> Regards,
> Arm
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2016-09-18 10:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 16:07 question about IIO buffer interface Armando Visconti
2016-09-10 14:53 ` Jonathan Cameron
2016-09-16 15:03 ` Armando Visconti
2016-09-18 10:54 ` Jonathan Cameron [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=c1c5978a-af55-e0ef-01ae-8df8b313c49d@kernel.org \
--to=jic23@kernel.org \
--cc=armando.visconti@st.com \
--cc=denis.ciocca@st.com \
--cc=linux-iio@vger.kernel.org \
--cc=lorenzo.bianconi@st.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;
as well as URLs for NNTP newsgroup(s).