From: Mukesh Savaliya <mukesh.savaliya@oss.qualcomm.com>
To: Aniket RANDIVE <aniket.randive@oss.qualcomm.com>,
andi.shyti@kernel.org, viken.dadhaniya@oss.qualcomm.com,
linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, Bjorande@oss.qualcomm.com
Cc: konrad.dybcio@oss.qualcomm.com
Subject: Re: [PATCH v6] i2c: i2c-qcom-geni: serve transfers during early resume
Date: Fri, 3 Jul 2026 11:16:51 +0530 [thread overview]
Message-ID: <b72f1900-972b-43a4-bfbd-5c85b6fab08d@oss.qualcomm.com> (raw)
In-Reply-To: <3777cef8-c90a-4c7a-9b71-c563e8d56f2e@oss.qualcomm.com>
Thanks Aniket for the review !
On 7/3/2026 10:21 AM, Aniket RANDIVE wrote:
>
>
> On 6/29/2026 7:11 PM, Mukesh Kumar Savaliya wrote:
[...]
>> index d2f5055b0b10..d56b36bd1d26 100644
>> --- a/drivers/i2c/busses/i2c-qcom-geni.c
>> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
>> @@ -913,6 +913,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;
>> + }
>
> Why we are checking specific error code here? Why can't we use the below
> error check directly?
> if get sync itself is failed with pm runtime disabled then why we are
> going ahead by making ret = 0 here? How you will make sure resources are
> enabled?
This reason is also mentioned in the commit log. we surely get -EACCESS
as runtime PM is disabled during no_irq resume phase. We still need to
serve the transfer, hence we need to override it.
Review geni_i2c_resume_noirq() to know what all we do to enable
resources. That's guaranteed and tested with system suspend/resume test
back to back and PCIe could do i2c transfer successfully.
>
>> if (ret < 0) {
>> dev_err(gi2c->se.dev, "error turning SE resources:%d\n", ret);
>> pm_runtime_put_noidle(gi2c->se.dev);
>> @@ -1045,7 +1049,8 @@ static int geni_i2c_probe(struct platform_device
>> *pdev)
>> platform_set_drvdata(pdev, gi2c);
>> /* 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);
>> if (ret)
>> return dev_err_probe(dev, ret,
>> @@ -1257,7 +1262,12 @@ static int __maybe_unused
>> geni_i2c_resume_noirq(struct device *dev)
>> if (ret)
>> return ret;
>> + /* Enforced disable_depth = 0 to actually enable runtime PM
>> during noirq phase */
>> + if (!pm_runtime_enabled(dev))
>> + pm_runtime_enable(dev);
>
> Here we are enabling the pm runtime so where we are disabling it?
>
when system goes to suspend, runtime PM gets disabled. Since we are in
early resume and runtime PM is still disabled, we need to enable it.
>> +
>> i2c_mark_adapter_resumed(&gi2c->adap);
>> +
>> return 0;
>> }
>
next prev parent reply other threads:[~2026-07-03 5:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 13:41 [PATCH v6] i2c: i2c-qcom-geni: serve transfers during early resume Mukesh Kumar Savaliya
2026-07-03 4:51 ` Aniket RANDIVE
2026-07-03 5:46 ` Mukesh Savaliya [this message]
2026-07-09 8:13 ` Aniket RANDIVE
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=b72f1900-972b-43a4-bfbd-5c85b6fab08d@oss.qualcomm.com \
--to=mukesh.savaliya@oss.qualcomm.com \
--cc=Bjorande@oss.qualcomm.com \
--cc=andi.shyti@kernel.org \
--cc=aniket.randive@oss.qualcomm.com \
--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=viken.dadhaniya@oss.qualcomm.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