linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A IIO trigger problem/bug.
@ 2012-05-31 15:56 Ge Gao
  2012-06-01  7:59 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Ge Gao @ 2012-05-31 15:56 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

Dear all,
    I met a strange problem concerning IIO driver. I wrote a driver that
has trigger, ring buffer, just the standard way of doing things. It
sometimes runs OK. However, I found sometimes, the trigger is NOT triggered
at all. I am using a hardware interrupt to trigger a threaded ISR and
post-ISR. I can see the interrupt coming correctly. By using "cat
/proc/interrupts", I can see that the number of triggers stays the same
while the number of interrupt increases steadily.
   I am using "iio_trigger_generic_data_rdy_poll" in the trigger. In the
post ISR, I am using "iio_trigger_notify_done".
I check the IIO trigger code.  The trigger uses "trig->use_count" to do
things. If "trig->use_count" is not zero, nothing will happen. Where the
only place trig->use_count decreases is in "iio_trigger_notify_done". It is
possible that, if system is busy, that post ISR is NOT scheduled, such that
trig->use_count will NOT decrease. This would defeat all the mechanism of
trigger.  Or there are other possibilities that would fail?
   Thanks.

Best regards,

Ge GAO

[-- Attachment #2: Type: text/html, Size: 1191 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-01  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 15:56 A IIO trigger problem/bug Ge Gao
2012-06-01  7:59 ` Jonathan Cameron

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).