]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i2c: qcom-cci: drop custom suspend/resume and rely on runtime PM helpers
authorWenmeng Liu <wenmeng.liu@oss.qualcomm.com>
Thu, 25 Jun 2026 09:42:45 +0000 (17:42 +0800)
committerAndi Shyti <andi.shyti@kernel.org>
Tue, 28 Jul 2026 21:34:16 +0000 (23:34 +0200)
cci_resume() unconditionally calls cci_resume_runtime() regardless of
the runtime PM state.

If the device is already runtime-suspended before system suspend,
the clock is re-enabled while runtime_status remains RPM_SUSPENDED.
As a result, pm_request_autosuspend() does not arm the timer,
leaving the clock permanently enabled.

Fixes: e517526195de ("i2c: Add Qualcomm CCI I2C driver")
Signed-off-by: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
Cc: <stable@vger.kernel.org> # v5.8+
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260625-cci-v1-1-a100cda673ce@oss.qualcomm.com
drivers/i2c/busses/i2c-qcom-cci.c

index 4d64895a9e9e4e0bd5e0ccb5c3cc04b282b1e4d5..bdeda3979c4814b5cdb463734b8361da7fffa879 100644 (file)
@@ -492,24 +492,8 @@ static int __maybe_unused cci_resume_runtime(struct device *dev)
        return 0;
 }
 
-static int __maybe_unused cci_suspend(struct device *dev)
-{
-       if (!pm_runtime_suspended(dev))
-               return cci_suspend_runtime(dev);
-
-       return 0;
-}
-
-static int __maybe_unused cci_resume(struct device *dev)
-{
-       cci_resume_runtime(dev);
-       pm_request_autosuspend(dev);
-
-       return 0;
-}
-
 static const struct dev_pm_ops qcom_cci_pm = {
-       SET_SYSTEM_SLEEP_PM_OPS(cci_suspend, cci_resume)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
        SET_RUNTIME_PM_OPS(cci_suspend_runtime, cci_resume_runtime, NULL)
 };