patch "iio: resolver: ad2s1210: notify trigger and clear state on fault read" added to char-misc-next
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: resolver: ad2s1210: notify trigger and clear state on fault read
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release during the merge window.
If you have any questions about this process, please let me know.
From 70247658d0e783c93b48fcbc3b81d99e992ff478 Mon Sep 17 00:00:00 2001
From: Stepan Ionichev <[email protected]>
Date: Fri, 15 May 2026 18:31:38 +0500
Subject: iio: resolver: ad2s1210: notify trigger and clear state on fault read
error
ad2s1210_trigger_handler() walks several scan-mask branches and uses "goto error_ret" to land on the iio_trigger_notify_done() teardown at the bottom of the function for every I/O error -- except the MOD_CONFIG fault-register read, which uses a bare "return ret":
if (st->fixed_mode == MOD_CONFIG) {
unsigned int reg_val;
ret = regmap_read(st->regmap, AD2S1210_REG_FAULT, ®_val);
if (ret < 0)
return ret;
...
}Two problems on that path:
- the handler returns a negative errno where the prototype expects an irqreturn_t (IRQ_HANDLED / IRQ_NONE), so the caller in the IIO core sees a value outside the enum;
- iio_trigger_notify_done() is skipped, leaving the trigger busy-flag set. A single transient SPI/regmap error on the fault read then wedges the trigger so subsequent samples are dropped until the consumer is detached.
Convert the error path to "goto error_ret" so the failure path goes through the same notify_done() teardown as every other error in the handler.
--- drivers/iio/resolver/ad2s1210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/resolver/ad2s1210.c +1 -1
@@ -1334,7 +1334,7 @@ static irqreturn_t ad2s1210_trigger_handler(int irq, void *p) ret =regmap_read (st->regmap,AD2S1210_REG_FAULT , ®_val);if (ret <0 ) -return ret; + goto error_ret; st->sample.fault = reg_val; }
Signature · 1 line
2.54.0