From: Jonathan Cameron <jic23@kernel.org>
To: Xingyu Wu <xingyu.wu@starfivetech.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v1 2/2] iio: adc: Add StarFive SAR-ADC driver
Date: Fri, 22 May 2026 11:52:22 +0100 [thread overview]
Message-ID: <20260522115222.0d7efb86@jic23-huawei> (raw)
In-Reply-To: <NTZPR01MB095660868B0DE59B2B0161CC9F0F2@NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn>
On Fri, 22 May 2026 02:20:53 +0000
Xingyu Wu <xingyu.wu@starfivetech.com> wrote:
> On 2026/5/21 19:37, Jonathan Cameron wrote:
> >
> > >
> > > >
> > > > > +
> > > > > + starfive_saradc_ch_monitor_stop(priv, ch);
> > > >
> > > > Why stop it? Add a comment. We aren't interested in future events?
> > >
> > > If we do not stop it and the input voltage remains constant, the ADC could
> > continuously monitor the voltage and continuously trigger interrupts for the
> > bound.
> > > As a result, the CPU utilization rate will be high.
> >
> > Can you use an edge interrupt instead of a level one?
>
> No, it is a level interrupt in hardware.
Just to check. That's a restriction of the interrupt controller IP in that
it doesn't support edge interrupts on this particularly line?
Seems unfortunate given the block on the other end is providing something
that seems like an edge :( Ah well - hardly the first time we've hit that.
Add some comments to the code when you add the timer approach to
re enabling.
>
> >
> > If not, then a common solution is to disable for a period (maybe a second or so)
> > then reenable. There are various more refined ways of doing this.
>
> This is good idea. How about using timer to disable it?
yes, there are examples in tree doing that.
J
>
> >
> > Basically we don't want to be in a situation where a momentary blip disables the
> > event and we miss a later condition that must be handled.
> >
>
> Noted.
>
> Best regards,
> Xingyu Wu
next prev parent reply other threads:[~2026-05-22 10:52 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 8:18 [PATCH v1 0/2] Add StarFive SAR-ADC driver Xingyu Wu
2026-05-18 8:18 ` [PATCH v1 1/2] bindings: iio: adc: Add StarFive JHB100 SARADC Xingyu Wu
2026-05-18 8:24 ` sashiko-bot
2026-05-19 6:10 ` Xingyu Wu
2026-05-18 10:21 ` Rob Herring (Arm)
2026-05-18 16:24 ` Conor Dooley
2026-05-19 9:26 ` Xingyu Wu
2026-05-19 9:59 ` Conor Dooley
2026-05-20 9:43 ` Xingyu Wu
2026-05-20 15:14 ` Conor Dooley
2026-05-21 9:54 ` Xingyu Wu
2026-05-21 10:20 ` Conor Dooley
2026-05-21 10:48 ` Xingyu Wu
2026-05-21 11:39 ` Jonathan Cameron
2026-05-21 16:41 ` Conor Dooley
2026-05-22 1:56 ` Xingyu Wu
2026-05-20 11:11 ` Jonathan Cameron
2026-05-20 15:15 ` Conor Dooley
2026-05-20 11:54 ` Krzysztof Kozlowski
2026-05-21 8:37 ` Xingyu Wu
2026-05-18 8:18 ` [PATCH v1 2/2] iio: adc: Add StarFive SAR-ADC driver Xingyu Wu
2026-05-18 8:31 ` Andy Shevchenko
2026-05-19 7:47 ` Xingyu Wu
2026-05-18 8:48 ` sashiko-bot
2026-05-19 8:58 ` Xingyu Wu
2026-05-20 12:05 ` Jonathan Cameron
2026-05-21 9:43 ` Xingyu Wu
2026-05-21 11:37 ` Jonathan Cameron
2026-05-22 2:20 ` Xingyu Wu
2026-05-22 10:52 ` Jonathan Cameron [this message]
2026-05-20 11:44 ` [PATCH v1 0/2] " Jonathan Cameron
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=20260522115222.0d7efb86@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=xingyu.wu@starfivetech.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