From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Jishnu Prakash" <jishnu.prakash@oss.qualcomm.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Amit Kucheria" <amitk@kernel.org>,
"Thara Gopinath" <thara.gopinath@gmail.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Daniel Lezcano" <daniel.lezcano@kernel.org>,
"Zhang Rui" <rui.zhang@intel.com>,
"Lukasz Luba" <lukasz.luba@arm.com>,
linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
"Kamal Wadhwa" <kamal.wadhwa@oss.qualcomm.com>,
"David Collins" <david.collins@oss.qualcomm.com>,
"Anjelique Melendez" <anjelique.melendez@oss.qualcomm.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Stephan Gerhold" <stephan.gerhold@linaro.org>
Subject: Re: [PATCH v2 1/2] iio: adc: qcom-spmi-adc5-gen3: Share SDAM0 IRQ with ADC_TM auxiliary driver
Date: Thu, 4 Jun 2026 11:46:30 +0100 [thread overview]
Message-ID: <20260604114630.23ca427a@jic23-huawei> (raw)
In-Reply-To: <ah9ouLQFI7VtHCWL@ashevche-desk.local>
On Wed, 3 Jun 2026 02:35:20 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Tue, May 26, 2026 at 04:26:09PM +0530, 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.
>
> ...
>
> > + /*
> > + * This interrupt is shared with the ADC_TM auxiliary driver, which
> > + * is threaded and uses IRQF_ONESHOT. Since shared interrupts need
> > + * to agree on IRQF_ONESHOT configuration and there is a kernel
> > + * warning for using IRQF_ONESHOT with non-threaded interrupts,
> > + * make this also a threaded IRQ.
> > + */
> > +
> > + ret = devm_request_threaded_irq(dev, adc->dev_data.base[ADC5_GEN3_VADC_SDAM].irq,
> > + NULL, adc5_gen3_isr, IRQF_ONESHOT | IRQF_SHARED,
> > + adc->dev_data.base[ADC5_GEN3_VADC_SDAM].irq_name,
> > + adc);
> > if (ret)
> > return dev_err_probe(dev, ret,
> > "Failed to request SDAM%d irq\n",
>
> Also add a patch to drop this duplicate message.
>
There is another thread going on this. It might not be duplicate
if -EPROBE_DEFER is returned. The message won't be printed but it
will be logged for helping debug deferred probe reasons.
So maybe we have been a little too energetic in removing these.
static void __dev_probe_failed(const struct device *dev, int err, bool fatal,
const char *fmt, va_list vargsp)
{
struct va_format vaf;
va_list vargs;
/*
* On x86_64 and possibly on other architectures, va_list is actually a
* size-1 array containing a structure. As a result, function parameter
* vargsp decays from T[1] to T*, and &vargsp has type T** rather than
* T(*)[1], which is expected by its assignment to vaf.va below.
*
* One standard way to solve this mess is by creating a copy in a local
* variable of type va_list and then using a pointer to that local copy
* instead, which is the approach employed here.
*/
va_copy(vargs, vargsp);
vaf.fmt = fmt;
vaf.va = &vargs;
switch (err) {
case -EPROBE_DEFER:
device_set_deferred_probe_reason(dev, &vaf);
//this call.
dev_dbg(dev, "error %pe: %pV", ERR_PTR(err), &vaf);
break;
case -ENOMEM:
/* Don't print anything on -ENOMEM, there's already enough output */
break;
default:
/* Log fatal final failures as errors, otherwise produce warnings */
if (fatal)
dev_err(dev, "error %pe: %pV", ERR_PTR(err), &vaf);
else
dev_warn(dev, "error %pe: %pV", ERR_PTR(err), &vaf);
break;
}
va_end(vargs);
}
Jonathan
next prev parent reply other threads:[~2026-06-04 10:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 10:56 [PATCH v2 0/2] thermal: qcom: add support for PMIC5 Gen3 ADC thermal monitoring Jishnu Prakash
2026-05-26 10:56 ` [PATCH v2 1/2] iio: adc: qcom-spmi-adc5-gen3: Share SDAM0 IRQ with ADC_TM auxiliary driver Jishnu Prakash
2026-05-26 13:12 ` Daniel Lezcano
2026-05-27 11:26 ` Jonathan Cameron
2026-05-27 11:29 ` Jonathan Cameron
2026-06-02 23:35 ` Andy Shevchenko
2026-06-04 10:46 ` Jonathan Cameron [this message]
2026-06-04 14:44 ` Andy Shevchenko
2026-06-11 10:43 ` Jishnu Prakash
2026-06-11 18:53 ` Andy Shevchenko
2026-06-14 19:02 ` Jonathan Cameron
2026-05-26 10:56 ` [PATCH v2 2/2] thermal: qcom: add support for PMIC5 Gen3 ADC thermal monitoring Jishnu Prakash
2026-05-27 11:42 ` Jonathan Cameron
2026-06-11 10:42 ` Jishnu Prakash
2026-06-14 19:06 ` Jonathan Cameron
2026-06-02 23:44 ` Andy Shevchenko
2026-06-11 10:42 ` Jishnu Prakash
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=20260604114630.23ca427a@jic23-huawei \
--to=jic23@kernel.org \
--cc=amitk@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=anjelique.melendez@oss.qualcomm.com \
--cc=daniel.lezcano@kernel.org \
--cc=david.collins@oss.qualcomm.com \
--cc=dlechner@baylibre.com \
--cc=jishnu.prakash@oss.qualcomm.com \
--cc=kamal.wadhwa@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=neil.armstrong@linaro.org \
--cc=nuno.sa@analog.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=stephan.gerhold@linaro.org \
--cc=thara.gopinath@gmail.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