* [PATCH] iio: adc: ad4062: Replace IRQF_ONESHOT with IRQF_NO_THREAD
@ 2026-02-23 6:45 Felix Gu
2026-02-23 9:01 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Felix Gu @ 2026-02-23 6:45 UTC (permalink / raw)
To: Jorge Marques, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: Jonathan Cameron, linux-iio, linux-kernel, Felix Gu
In ad4062_request_irq(), when request irq for "gp1", the code uses
IRQF_ONESHOT flag, which is not appropriate for a primary handler
that does not have a secondary threaded handler.
And since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
in IRQ request and gives a warning if there is no threaded handler.
Since there is no threaded handler, replace devm_request_threaded_irq
with devm_request_irq, and replace IRQF_ONESHOT with IRQF_NO_THREAD.
Also remove an extraneous semicolon at the end of
ad4062_write_raw_dispatch().
Found by code review, compile pass.
Fixes: d5284402d28f ("iio: adc: Add support for ad4062")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/iio/adc/ad4062.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/adc/ad4062.c b/drivers/iio/adc/ad4062.c
index dd4ad32aa6f5..8b03736d55fc 100644
--- a/drivers/iio/adc/ad4062.c
+++ b/drivers/iio/adc/ad4062.c
@@ -719,10 +719,8 @@ static int ad4062_request_irq(struct iio_dev *indio_dev)
}
st->gpo_irq[1] = true;
- return devm_request_threaded_irq(dev, ret,
- ad4062_irq_handler_drdy,
- NULL, IRQF_ONESHOT, indio_dev->name,
- indio_dev);
+ return devm_request_irq(dev, ret, ad4062_irq_handler_drdy,
+ IRQF_NO_THREAD, indio_dev->name, indio_dev);
}
static const struct iio_trigger_ops ad4062_trigger_ops = {
@@ -955,7 +953,7 @@ static int ad4062_write_raw_dispatch(struct ad4062_state *st, int val, int val2,
default:
return -EINVAL;
}
-};
+}
static int ad4062_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int val,
---
base-commit: d4906ae14a5f136ceb671bb14cedbf13fa560da6
change-id: 20260223-ad4062-fce848da6851
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: adc: ad4062: Replace IRQF_ONESHOT with IRQF_NO_THREAD
2026-02-23 6:45 [PATCH] iio: adc: ad4062: Replace IRQF_ONESHOT with IRQF_NO_THREAD Felix Gu
@ 2026-02-23 9:01 ` Andy Shevchenko
2026-02-24 13:44 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-02-23 9:01 UTC (permalink / raw)
To: Felix Gu, Sebastian Andrzej Siewior
Cc: Jorge Marques, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jonathan Cameron, linux-iio, linux-kernel
On Mon, Feb 23, 2026 at 02:45:13PM +0800, Felix Gu wrote:
> In ad4062_request_irq(), when request irq for "gp1", the code uses
> IRQF_ONESHOT flag, which is not appropriate for a primary handler
> that does not have a secondary threaded handler.
>
> And since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
> without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
> in IRQ request and gives a warning if there is no threaded handler.
>
> Since there is no threaded handler, replace devm_request_threaded_irq
> with devm_request_irq, and replace IRQF_ONESHOT with IRQF_NO_THREAD.
>
> Also remove an extraneous semicolon at the end of
> ad4062_write_raw_dispatch().
>
> Found by code review, compile pass.
Wondering if @bigeasy already sent a patch for this.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: adc: ad4062: Replace IRQF_ONESHOT with IRQF_NO_THREAD
2026-02-23 9:01 ` Andy Shevchenko
@ 2026-02-24 13:44 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-02-24 13:44 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Felix Gu, Jorge Marques, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jonathan Cameron, linux-iio, linux-kernel
On 2026-02-23 11:01:09 [+0200], Andy Shevchenko wrote:
> Wondering if @bigeasy already sent a patch for this.
No, I haven't. This got in v7.0-rc1 and I haven't checked -next at the
time…
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Sebastian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-24 13:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 6:45 [PATCH] iio: adc: ad4062: Replace IRQF_ONESHOT with IRQF_NO_THREAD Felix Gu
2026-02-23 9:01 ` Andy Shevchenko
2026-02-24 13:44 ` Sebastian Andrzej Siewior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox