Re: [PATCH v2 1/2] iio: adc: qcom-spmi-adc5-gen3: Share SDAM0 IRQ with ADC_TM auxiliary driver
From: Jonathan Cameron
Date: Wed May 27 2026 - 07:27:02 EST
On Tue, 26 May 2026 15:12:30 +0200
Daniel Lezcano <daniel.lezcano@xxxxxxxxxxxxxxxx> wrote:
> Hi Andy, Johnathan,
>
> On 5/26/26 12:56, Jishnu Prakash wrote:
> > The SDAM0 IRQ can be triggered for both EOC (end of conversion) events for
> > immediate ADC reads done in this driver and for threshold violation events,
> > based on ADC_TM thresholds configured from the auxiliary ADC_TM driver on
> > TM channels on the first SDAM.
> >
> > At present, this interrupt is handled only in the ISR in the main ADC driver.
> > When the ISR is triggered for an ADC_TM event, this driver notifies the ADC_TM
> > driver by calling a notifier callback exposed from it for this purpose.
> >
> > To simplify the interrupt handling in both drivers, share the interrupt between
> > the drivers. With this, ADC_TM interrupts on SDAM0 will be handled directly in
> > the ADC_TM driver, so remove the notifier callback and all TM interrupt
> > handling in the main ADC ISR.
>
> Given the nature of these changes reworking how is handled the interrupt
> to share it properly with the TM sensor and the dependency of patch 2 on
> this one, I think it makes sense to merge these two patches through the
> thermal tree. Are you fine with that ?
Yes, but perhaps not just yet:
https://sashiko.dev/#/patchset/20260526-gen3_adc_tm-v2-0-702fbac919ac%40oss.qualcomm.com
Has some stuff beyond the usual other things I found whilst here that look plausible
from a first glance.
The one about clearing irqs from other SDAMS potentially leading to repeated IRQ_NONE
and disabling of an sdam interrupt seems correct to me - but maybe I'm missing something!
Jonathan