Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD

Jonathan Cameron
2026-01-23T16:47:16Z

> > +++ b/drivers/iio/accel/adxl372.c
>
> > + ret = devm_request_irq(dev, st->irq,
> > + iio_trigger_generic_data_rdy_poll,
> > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
> > + indio_dev->name, st->dready_trig);
> > if (ret < 0)
> > return ret;
>
> Interestingly that this driver ignores the flags from firmware... Seems to me
> like a bug (not in your patch, obviously). Ditto for other drivers doing similar
> things.
>

It's indeed a bug but one of those historic ones we can't fix without
high risk of regressions :(

> ...
>
> > --- a/drivers/iio/pressure/dlhl60d.c
> > +++ b/drivers/iio/pressure/dlhl60d.c
> > @@ -306,9 +306,9 @@ static int dlh_probe(struct i2c_client *client)
> > indio_dev->num_channels = ARRAY_SIZE(dlh_channels);
> >
> > if (client->irq > 0) {
> > - ret = devm_request_threaded_irq(&client->dev, client->irq,
> > - dlh_interrupt, NULL,
> > - IRQF_TRIGGER_RISING | IRQF_ONESHOT,
> > + ret = devm_request_irq(&client->dev, client->irq,
> > + dlh_interrupt,
>
> Joined to the previous line it gives exactly 80 characters, which is allowed.
>
> > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
> > st->info->name, indio_dev);
>
> Forgot to indent.
>
> ...
>
> > + ret = devm_request_irq(&client->dev, client->irq,
> > + iio_trigger_generic_data_rdy_poll,
> > + IRQF_NO_THREAD, "tmp006_irq",
> > + data->drdy_trig);
> > if (ret < 0)
> > return ret;
>
> Jonathan et al., this seems to me like a duplication from one to another
> driver. Can't we do like a helper for it, so we don't change it each time
> the IRQ core or other things got changed?

I'm not sure what the helper would include that would shorten things much:
could hide two params, but need a longer name and that's going to be
hard to find. So maybe...

J
>