Re: [PATCH 19/21] iio: Use IRQF_NO_THREAD

Sebastian Andrzej Siewior
2026-01-26T08:09:06Z

On 2026-01-23 14:56:32 [-0600], David Lechner wrote:
> > -static irqreturn_t ad7766_irq(int irq, void *private)
> > -{
> > - iio_trigger_poll(private);
> > - return IRQ_HANDLED;
> > -}
> > -
>
> Replacing this with iio_trigger_generic_data_rdy_poll() seems like a
> separate improvement that should be in a separate patch.
>
> At a minimum, the commit message should explain this change. But I expect
> the reason will make it obvious it should be a separate patch.

The other use iio_trigger_generic_data_rdy_poll() as the handler except
this one. Which uses a wrapper around it. It looked to easier to add
this hunk.
What do you want (split or keep)?

> > static int ad7766_set_trigger_state(struct iio_trigger *trig, bool enable)
> > {
> > struct ad7766 *ad7766 = iio_trigger_get_drvdata(trig);
> > @@ -260,8 +254,8 @@ static int ad7766_probe(struct spi_device *spi)
> > * Some platforms might not allow the option to power it down so
> > * don't enable the interrupt to avoid extra load on the system
> > */
> > - ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq,
> > - IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
> > + ret = devm_request_irq(&spi->dev, spi->irq, iio_trigger_generic_data_rdy_poll,
> > + IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN | IRQF_NO_THREAD,
> > dev_name(&spi->dev),
> > ad7766->trig);
> > if (ret < 0)

Sebastian