[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac45bbeb-7a76-42f0-88d8-35dbf9742a0c@baylibre.com>
Date: Fri, 23 Jan 2026 14:56:32 -0600
From: David Lechner <dlechner@...libre.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
linux-kernel@...r.kernel.org
Cc: linux-rt-devel@...ts.linux.dev, Thomas Gleixner <tglx@...nel.org>,
Jonathan Cameron <jic23@...nel.org>, Nuno Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>, linux-iio@...r.kernel.org
Subject: Re: [PATCH 19/21] iio: Use IRQF_NO_THREAD
On 1/23/26 5:37 AM, Sebastian Andrzej Siewior wrote:
> The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke
> other interrupt handler and this supposed to happen from within the
> hardirq.
>
> Use IRQF_NO_THREAD to forbid forced-threading.
>
...
> diff --git a/drivers/iio/adc/ad7766.c b/drivers/iio/adc/ad7766.c
> index 4d570383ef025..9e4a66477d2d0 100644
> --- a/drivers/iio/adc/ad7766.c
> +++ b/drivers/iio/adc/ad7766.c
> @@ -184,12 +184,6 @@ static const struct iio_info ad7766_info = {
> .read_raw = &ad7766_read_raw,
> };
>
> -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.
> 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)
Powered by blists - more mailing lists