From: Stepan Ionichev <sozdayvek@gmail.com>
To: jic23@kernel.org
Cc: daniel.lezcano@linaro.org, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, gregkh@linuxfoundation.org,
hcazarim@yahoo.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
sozdayvek@gmail.com
Subject: [PATCH] iio: adc: nxp-sar-adc: notify trigger on channel read error in buffer ISR
Date: Sun, 17 May 2026 21:31:11 +0500 [thread overview]
Message-ID: <20260517163111.469-1-sozdayvek@gmail.com> (raw)
nxp_sar_adc_isr_buffer() bails on the first channel-read failure
without calling iio_trigger_notify_done(), so a single I/O error
leaves the trigger's use_count stuck and the buffer flow wedged
until rebind.
Route the error exit through a 'done:' label that always calls
iio_trigger_notify_done().
Fixes: 4434072a893e ("iio: adc: Add the NXP SAR ADC support for the s32g2/3 platforms")
Cc: stable@vger.kernel.org
Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
---
drivers/iio/adc/nxp-sar-adc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/nxp-sar-adc.c b/drivers/iio/adc/nxp-sar-adc.c
index 9d9f2c76b..ed004812c 100644
--- a/drivers/iio/adc/nxp-sar-adc.c
+++ b/drivers/iio/adc/nxp-sar-adc.c
@@ -341,7 +341,7 @@ static void nxp_sar_adc_isr_buffer(struct iio_dev *indio_dev)
ret = nxp_sar_adc_read_data(info, info->buffered_chan[i]);
if (ret < 0) {
nxp_sar_adc_read_notify(info);
- return;
+ goto done;
}
info->buffer[i] = ret;
@@ -352,6 +352,7 @@ static void nxp_sar_adc_isr_buffer(struct iio_dev *indio_dev)
iio_push_to_buffers_with_ts(indio_dev, info->buffer, sizeof(info->buffer),
iio_get_time_ns(indio_dev));
+done:
iio_trigger_notify_done(indio_dev->trig);
}
--
2.43.0
next reply other threads:[~2026-05-17 16:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-17 16:31 Stepan Ionichev [this message]
2026-05-17 16:33 ` [PATCH] iio: adc: nxp-sar-adc: notify trigger on channel read error in buffer ISR Stepan Ionichev
-- strict thread matches above, loose matches on Subject: below --
2026-05-17 16:23 Stepan Ionichev
2026-05-17 17:07 ` David Lechner
2026-05-18 15:19 ` 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=20260517163111.469-1-sozdayvek@gmail.com \
--to=sozdayvek@gmail.com \
--cc=andy@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=hcazarim@yahoo.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=stable@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