[PATCH 2/2] i2c: qcom-cci: Suspend the controller 50 ms after the last transfer

From: Birk Skyum

Date: Tue Oct 20 2026 - 15:42:55 EST


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@xxxxx>
---
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