* read_raw when buffered sampling enabled
@ 2016-02-12 10:05 Gregor Boirie
2016-02-12 17:23 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Gregor Boirie @ 2016-02-12 10:05 UTC (permalink / raw)
To: linux-iio
Greetings,
I see in several iio drivers supporting triggered buffer mode that read_raw
returns -EBUSY when buffered sampling is enabled. This additional logic
is implemented in read_raw using iio_buffer_enabled().
Since some drivers don't implement this I'm wondering wether this logic is
an IIO design requirement or if this is device / driver specific.
Regards,
Grégor.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: read_raw when buffered sampling enabled
2016-02-12 10:05 read_raw when buffered sampling enabled Gregor Boirie
@ 2016-02-12 17:23 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-02-12 17:23 UTC (permalink / raw)
To: Gregor Boirie, linux-iio, Gregor Boirie, linux-iio
On 12 February 2016 10:05:11 GMT+00:00, Gregor Boirie <gregor.boirie@parrot.com> wrote:
>Greetings,
>
>I see in several iio drivers supporting triggered buffer mode that
>read_raw
>returns -EBUSY when buffered sampling is enabled. This additional logic
>is implemented in read_raw using iio_buffer_enabled().
>Since some drivers don't implement this I'm wondering wether this logic
>is
>an IIO design requirement or if this is device / driver specific.
Driver specific. Usually depends on whether such a read will
materially effect capture to a buffer. So usually prevent
reads if for example a new data interrupt would be skipped
or a sequence of data disrupted.
Some devices will read a last captured value out without
effecting the flow so don't need to prevent such reads.
Others do every read on demand, so other than possible bus congestion, there is no
reason to prevent such reads (and congestion is largely beyond our control,
is we don't lock the bus up, anyway so who cares!)
I have thought about adding some caching in the core to allow in kernel
polled and push clients to run at the same time but that would require explicit
notice that a polled client might want the data and some fun with an additional
cache buffer attached.
Jonathan
>
>Regards,
>Grégor.
>--
>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
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-12 17:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 10:05 read_raw when buffered sampling enabled Gregor Boirie
2016-02-12 17:23 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox