Devicetree
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Chi-Wen Weng <cwweng.linux@gmail.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	chernyakin.victor.j@outlook.com, cwweng@nuvoton.com
Subject: Re: [PATCH v5 3/3] iio: adc: Add Nuvoton MA35D1 EADC driver
Date: Sun, 29 Nov 2026 00:17:28 +0000	[thread overview]
Message-ID: <20261129001728.41b338e1@jic23-hlaptop> (raw)
In-Reply-To: <c88fd429-025a-406d-ad80-ec464db7d1cd@gmail.com>

>  > > +	if (!iio_buffer_enabled(indio_dev))
>  > > +		return 0;  
>  >
>  > As above, I'm missing why we need to protect the call
>  > to resume_triggering. The pollfunc can't change between
>  > suspend and resume so there is either one there or not
>  > in both cases and the guards inside that call should take care
>  > of the rest. If I'm missing something we should look to
>  > fix it in those calls!  
> 
> Agreed. The same uninitialized IRQ concern applies to the resume helper.
> 
> I also noticed that iio_trigger_attach_poll_func() does not clear 
> pf->irq on its error paths. If request_threaded_irq() or 
> set_trigger_state() fails, pf->irq can retain a stale positive IRQ 
> number after the resources have been released. The normal detach path 
> explicitly resets it to 0.

> 
> The error propagation from iio_trigger_get_irq() was fixed by 
> dff701806ab6, but these two IRQ state issues remain in v7.4-rc4.
> 
> Would it make sense to initialize pf->irq to 0 in iio_alloc_pollfunc() 
> and clear it on the attach error paths?

Perfect. I'd written exactly that above before reading down to here.

Thanks,

Jonathan

> 
> I agree that fixing this in the IIO core would be preferable to relying 
> on driver-specific checks. I haven't reproduced an IRQ failure at 
> runtime; these findings are based on source inspection.
> 
> Thanks,
> Chi-Wen
> 


      reply	other threads:[~2026-11-29  0:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  8:28 [PATCH v5 0/3] iio: adc: Add Nuvoton MA35D1 EADC support Chi-Wen Weng
2026-11-17  8:28 ` [PATCH v5 1/3] dt-bindings: iio: adc: Fix channel property validation Chi-Wen Weng
2026-11-18 16:31   ` Rob Herring (Arm)
2026-11-17  8:28 ` [PATCH v5 2/3] dt-bindings: iio: adc: Add Nuvoton MA35D1 EADC Chi-Wen Weng
2026-11-17  8:42   ` sashiko-bot
2026-11-25  1:40     ` Chi-Wen Weng
2026-11-29  0:12       ` Jonathan Cameron
2026-11-18 16:33   ` Rob Herring (Arm)
2026-11-17  8:28 ` [PATCH v5 3/3] iio: adc: Add Nuvoton MA35D1 EADC driver Chi-Wen Weng
2026-11-17  9:43   ` Andy Shevchenko
2026-11-22  3:06   ` Jonathan Cameron
2026-11-24  8:41     ` Chi-Wen Weng
2026-11-29  0:17       ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261129001728.41b338e1@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=chernyakin.victor.j@outlook.com \
    --cc=conor+dt@kernel.org \
    --cc=cwweng.linux@gmail.com \
    --cc=cwweng@nuvoton.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox