Linux IIO development
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Stepan Ionichev <sozdayvek@gmail.com>, jic23@kernel.org
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] iio: pressure: rohm-bm1390: harden trigger handler against transient errors
Date: Tue, 19 May 2026 09:19:55 +0300	[thread overview]
Message-ID: <01292abd-0f16-4ec4-9f48-36267973eb7a@gmail.com> (raw)
In-Reply-To: <20260518181110.1467-1-sozdayvek@gmail.com>

On 18/05/2026 21:11, Stepan Ionichev wrote:
> bm1390_trigger_handler() returns from three error paths without calling
> iio_trigger_notify_done(). The success path at the end does, so on a
> transient regmap or read failure the trigger's use_count is never
> decremented and iio_trigger_poll_chained() drops subsequent dispatches
> until the trigger is reattached.
> 
> This is not a fix for a reported bug, only hardening against hardware
> or bus glitches; if a glitch is persistent the device is wedged and
> needs an unbind anyway, which is left to the user.
> 
> Split the function so the inner helper returns bool with the data-read
> outcome, and the outer IRQ handler calls iio_trigger_notify_done()
> once and reports the result via IRQ_RETVAL().
> 
> Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>

Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>

-- 
---
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~

  reply	other threads:[~2026-05-19  6:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 18:11 [PATCH v3] iio: pressure: rohm-bm1390: harden trigger handler against transient errors Stepan Ionichev
2026-05-19  6:19 ` Matti Vaittinen [this message]
2026-07-03 23:00   ` 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=01292abd-0f16-4ec4-9f48-36267973eb7a@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=sozdayvek@gmail.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