RE: [PATCH v1 2/2] iio: adc: Add StarFive SAR-ADC driver
From: Xingyu Wu
Date: Thu May 21 2026 - 22:22:30 EST
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.
>
> 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?
>
> 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