From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: Markus Burri <markus.burri@mt.com>,
linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
linux-iio@vger.kernel.org, Nuno Sa <nuno.sa@analog.com>
Subject: Re: [PATCH v1] iio: adc: ad_sigma_delta: Clear pending interrupts before enable
Date: Sat, 13 Apr 2024 16:56:36 +0100 [thread overview]
Message-ID: <20240413165636.4fa8eb60@jic23-huawei> (raw)
In-Reply-To: <b6c6700d924916dd09afd2878321a7c87b8e922d.camel@gmail.com>
On Mon, 08 Apr 2024 10:31:21 +0200
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Sat, 2024-04-06 at 17:17 +0100, Jonathan Cameron wrote:
> > On Thu, 4 Apr 2024 19:51:26 +0200
> > Markus Burri <markus.burri@mt.com> wrote:
> >
> > Hi Markus,
> >
> >
> > > For device will enable and disable irq contiously like AD7195,
> > > it use DOUT/RDY pin for both SPI transfer and data ready.
> > > It will disable irq during SPI transfer, and re-eanble irq after SPI
> > > transfer.
> > > That may cause irq status bit set to 1 during spi transfer.
> >
> > Superficially that sounds like it might be an irq driver bug to me...
> > Or just possibly an irq chip doing lazy disabling?
>
> Yes, this sounds odd as we are already explicitly disabling lazy disabling:
>
> https://elixir.bootlin.com/linux/latest/source/drivers/iio/adc/ad_sigma_delta.c#L589
Markus, can you confirm you are running no a kernel with that line present?
Maybe this is just an old kernel not having the fix?
>
> >
> > >
> > > When the active condition has been detected, the corresponding bit
> > > remains set until cleared by software. Status flags are cleared
> > > by writing a 1 to the corresponding bit position.
> > >
> > > Signed-off-by: Markus Burri <markus.burri@mt.com>
> >
> > I'll need an appropriate ADI ack for this one.
> >
>
> Yeah, I wanted to reply to this one Friday but then completely forgot. I can't
> really ack this one. I would need some insights from someone with more core IRQ
> knowledge. But...
>
> > It seems highly unusual to be calling a generic irqchip related function in a
> > driver (there are no other such users). So this seems unlikely to be
> > the right fix for this particular problem.
> >
>
> Yes, and this (I think) would not even fix (if a fix is needed) this for all
> irqchips which to me already sounds not the way to go.
>
> - Nuno Sá
> >
prev parent reply other threads:[~2024-04-13 15:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 17:51 [PATCH v1] iio: adc: ad_sigma_delta: Clear pending interrupts before enable Markus Burri
2024-04-06 16:17 ` Jonathan Cameron
2024-04-08 8:31 ` Nuno Sá
2024-04-13 15:56 ` 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=20240413165636.4fa8eb60@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.burri@mt.com \
--cc=noname.nuno@gmail.com \
--cc=nuno.sa@analog.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).