From: Birk Skyum <birk.skyum@pm.me>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>,
Robert Foss <rfoss@kernel.org>,
Andi Shyti <andi.shyti@kernel.org>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>,
Saikiran <bjsaikiran@gmail.com>, Mark Brown <broonie@kernel.org>,
linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] i2c: qcom-cci: Suspend the controller 50 ms after the last transfer
Date: Tue, 20 Oct 2026 19:39:57 +0000 [thread overview]
Message-ID: <20261020193946.51478-3-birk.skyum@pm.me> (raw)
In-Reply-To: <20261020193946.51478-1-birk.skyum@pm.me>
With a 1 s autosuspend delay the controller stays clocked across any
power cycle of a target that is shorter than a second, so the reset on
resume never runs in between and the first transfer after the target
comes back stalls until the 100 ms timeout. Camera sensors are powered
down when they stop streaming and up again when they start, so closing
and reopening a camera quickly hits this.
On the Lenovo Yoga Slim 7x (X1E80100), restarting the OV02C10 with
v4l2-ctl after pauses of 0.05, 0.1, 0.2 and 0.5 s failed in 19 of 20
cycles each, and in 16 of 20 after 1 s pauses. With this change and the
reset on resume, all 100 cycles started, and so did 150 of 150
libcamera starts back to back.
Transfers come in bursts (a sensor mode alone is a few hundred register
writes), so suspending 50 ms after the last one costs one reset per
burst.
Signed-off-by: Birk Skyum <birk.skyum@pm.me>
---
drivers/i2c/busses/i2c-qcom-cci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index 51ce174..62b0fcb 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -794,7 +794,7 @@ static int cci_probe(struct platform_device *pdev)
if (ret < 0)
goto disable_clocks;
- pm_runtime_set_autosuspend_delay(dev, MSEC_PER_SEC);
+ pm_runtime_set_autosuspend_delay(dev, 50);
ret = devm_pm_runtime_set_active_enabled(dev);
if (ret)
goto disable_clocks;
--
2.53.0
next prev parent reply other threads:[~2026-10-20 19:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 19:39 [PATCH 0/2] i2c: qcom-cci: Recover after a target powers down under a running controller Birk Skyum
2026-10-20 19:39 ` [PATCH 1/2] i2c: qcom-cci: Reset the controller when it resumes Birk Skyum
2026-10-21 7:20 ` Loic Poulain
2026-10-21 19:37 ` Birk Skyum
2026-10-20 19:39 ` Birk Skyum [this message]
2026-10-21 7:44 ` [PATCH 2/2] i2c: qcom-cci: Suspend the controller 50 ms after the last transfer Loic Poulain
2026-10-21 19:37 ` Birk Skyum
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=20261020193946.51478-3-birk.skyum@pm.me \
--to=birk.skyum@pm.me \
--cc=andi.shyti@kernel.org \
--cc=bjsaikiran@gmail.com \
--cc=broonie@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=jishnu.prakash@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=rfoss@kernel.org \
--cc=vladimir.zapolskiy@linaro.org \
/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
all inboxes | Powered by JetHome®