public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Ibrahim Bagriyanik <ibrahim.bagriyanikb@gmail.com>
To: linux-iio@vger.kernel.org
Cc: jic23@kernel.org
Subject: iio: trigger: Software Resend of Triggers
Date: Sat, 24 Aug 2024 22:05:42 +0300	[thread overview]
Message-ID: <20240824190544.5705-1-ibrahim.bagriyanikb@gmail.com> (raw)

Dear IIO Community,

I was developing a device driver for the MAX11040K ADC and have encountered an issue where the device begins sampling but stops after a few seconds. After debugging, I found that when an interrupt arrives while another trigger handler is still in progress -has not called iio_trigger_notify_done-, the poll calls seem to get lost.

As you know, the kernel provides the CONFIG_HARDIRQS_SW_RESEND option for software resends of IRQs. This feature masks IRQs in the control flow and resends them once the current IRQ handler finishes. I looked for a similar implementation in the IIO trigger source code but couldn't find anything.

Is there a similar mechanism within IIO, or how do others typically address this problem on slower processors? If there isn't, would implementing such a feature in IIO make sense? I tackled this by simply not using IIO triggers, and only thing I thought to make use of was simply blocking poll calls with synchronization primitives until the former trigger finishes. I would appreciate your thoughts and suggestions.

Best,
Ibrahim Bagriyanik.

             reply	other threads:[~2024-08-24 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-24 19:05 Ibrahim Bagriyanik [this message]
2024-08-26 11:29 ` iio: trigger: Software Resend of Triggers Jonathan Cameron
2024-08-28  9:15   ` Ibrahim Bagriyanik
2024-08-28 13:26     ` Jonathan Cameron

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=20240824190544.5705-1-ibrahim.bagriyanikb@gmail.com \
    --to=ibrahim.bagriyanikb@gmail.com \
    --cc=jic23@kernel.org \
    --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