Thread (25 messages) 25 messages, 4 authors, 2015-08-22

Re: [PATCH v3 5/7] iio: Support triggered events

From: Vladimir Barinov <hidden>
Date: 2015-08-07 16:10:46
Also in: linux-iio, lkml

Hi Lars,

On 07.08.2015 16:45, Lars-Peter Clausen wrote:
Hi,

On 07/29/2015 02:57 PM, Vladimir Barinov wrote:
quoted
Support triggered events.

This is useful for chips that don't have their own interrupt sources.
It allows to use generic/standalone iio triggers for those drivers.
Thanks for the patch. Can you describe in more detail how
INDIO_EVENT_TRIGGERED differs from the INDIO_BUFFER_TRIGGERED. By just
looking at the source code I don't understand quite why it is necessary.
This is needed for the case when iio buffer is not used and used only 
iio event.

The difference to INDIO_BUFFER_TRIGGERED is that for triggered buffer 
the trigger poll function is attached (using 
iio_trigger_attach_poll_func) only in
industrialio-buffer.c using number of steps/conditions starting by 
issuing 1 to buffer/enable sysfs path.

For chips that do not use iio buffer but use only iio events the 
iio_trigger_attach_poll_func never called.

In case of using INDIO_BUFFER_TRIGGERED the poll func is 
attached/detached via industrialio-buffer.c
In case of using INDIO_EVENT_TRIGGERED the poll func is 
attached/detached via industrialio-trigger.c during set/change the 
current trigger.

Regards,
Vladimir
Thanks,
- Lars
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help