Linux I2C development
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
Cc: Frank.Li@kernel.org, viken.dadhaniya@oss.qualcomm.com,
	 dmitry.baryshkov@oss.qualcomm.com, zhengxingda@iscas.ac.cn,
	kees@kernel.org,  quic_jseerapu@quicinc.com,
	linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
	 linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	bjorn.andersson@oss.qualcomm.com,
	 konrad.dybcio@oss.qualcomm.com,
	Aniket Randive <aniketrandive@oss.qualcomm.com>
Subject: Re: [PATCH v7 1/2] i2c: qcom-geni: Handle runtime PM disabled state during early resume
Date: Wed, 29 Jul 2026 22:20:52 +0200	[thread overview]
Message-ID: <ampZkhgF-3wk8hu6@zenone.zhora.eu> (raw)
In-Reply-To: <20260709134623.1724212-2-mukesh.savaliya@oss.qualcomm.com>

Hi Mukesh,

...

> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index 96dbf04138be..4bc00922cd97 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -917,6 +917,10 @@ static int geni_i2c_xfer(struct i2c_adapter *adap,
>  	gi2c->err = 0;
>  	reinit_completion(&gi2c->done);
>  	ret = pm_runtime_get_sync(gi2c->se.dev);
> +	if (ret == -EACCES) {
> +		dev_warn(gi2c->se.dev, "Runtime PM is disabled:%d\n", ret);
> +		ret = 0;
> +	}

I have to agree with Praveen here. Ignoring -EACCES is not safe:
geni_i2c_runtime_resume() is not guaranteed to have run in that
case.

Also, pm_runtime_force_resume() already re-enables runtime PM
before returning, so the additional pm_runtime_enable() is
unnecessary.

>  	if (ret < 0) {
>  		dev_err(gi2c->se.dev, "error turning SE resources:%d\n", ret);
>  		pm_runtime_put_noidle(gi2c->se.dev);
> @@ -1115,7 +1119,8 @@ static int geni_i2c_probe(struct platform_device *pdev)
>  		return ret;
>  
>  	/* Keep interrupts disabled initially to allow for low-power modes */
> -	ret = devm_request_irq(dev, gi2c->irq, geni_i2c_irq, IRQF_NO_AUTOEN,
> +	ret = devm_request_irq(dev, gi2c->irq, geni_i2c_irq,
> +			       IRQF_NO_AUTOEN | IRQF_NO_SUSPEND | IRQF_EARLY_RESUME,
>  			       dev_name(dev), gi2c);

IRQF_EARLY_RESUME and IRQF_NO_SUSPEND are reundant. Perhaps for
this use case we should leave only IRQF_EARLY_RESUME?

Thanks,
Andi

>  	if (ret)
>  		return dev_err_probe(dev, ret,

  parent reply	other threads:[~2026-07-29 20:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 13:46 [PATCH v7 0/2] i2c: i2c-qcom-geni: serve transfers during early resume Mukesh Kumar Savaliya
2026-07-09 13:46 ` [PATCH v7 1/2] i2c: qcom-geni: Handle runtime PM disabled state " Mukesh Kumar Savaliya
     [not found]   ` <9cf5b5ab-c418-4b0d-8b2f-b888a64db0f0@oss.qualcomm.com>
     [not found]     ` <933d864d-f0c2-4727-a01d-f564eb854d23@oss.qualcomm.com>
     [not found]       ` <4133bbcb-22e7-41e0-b9f4-affd63df0e38@oss.qualcomm.com>
     [not found]         ` <86828cb8-0e96-48ce-aff4-0f7e59438ad7@oss.qualcomm.com>
2026-07-24  4:42           ` Praveen Talari
2026-07-24  6:35             ` Mukesh Savaliya
2026-07-24  8:29               ` Praveen Talari
2026-07-29 20:20   ` Andi Shyti [this message]
2026-07-09 13:46 ` [PATCH v7 2/2] dmaengine: qcom-gpi: Keep GPI interrupt active during system resume Mukesh Kumar Savaliya
2026-07-29 20:21   ` Andi Shyti

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=ampZkhgF-3wk8hu6@zenone.zhora.eu \
    --to=andi.shyti@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=aniketrandive@oss.qualcomm.com \
    --cc=bjorn.andersson@oss.qualcomm.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=kees@kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mukesh.savaliya@oss.qualcomm.com \
    --cc=quic_jseerapu@quicinc.com \
    --cc=viken.dadhaniya@oss.qualcomm.com \
    --cc=zhengxingda@iscas.ac.cn \
    /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