Report one issue caused by different return value of pm_runtime_resume_and_get() in 6.18

From: Carlos Song

Date: Sun Dec 07 2025 - 22:35:28 EST


Hi, Rafael

I meet one issue possibly caused by this patch set:
https://patchwork.kernel.org/project/linux-pm/patch/2336655.iZASKD2KPV@xxxxxxxxxxxxx/

I found pm_runtime_resume_and_get() function returned different value after pm_runtime_force_suspend() in 6.18 compared with 6.12.

In 6.18: pm_runtime_resume_and_get 0;
pm_runtime_status_suspended(dev)) 0;
pm_runtime_enabled(dev)) 0;

In 6.12: pm_runtime_resume_and_get -13;
pm_runtime_status_suspended(dev)) 1;
pm_runtime_enabled(dev)) 0;

This issue happened on IMX8QM LPI2C + PTN5110 typec:

LPI2C need to remain active during resume_noirq() or suspend_noirq(), this patch is merged to i2c-imx-lpi2c driver:
https://patchwork.kernel.org/project/imx/patch/20241227084736.1323943-1-carlos.song@xxxxxxx/
LPI2C will depend on pm_runtime_force_suspend() and pm_runtime_force_resume() to make controller available until the system enters
suspend_noirq() and from resume_noirq().

Typec will create one tcpm kthread, tcpm kthread worker may execute some works at the very end of system suspend or the very beginning of system resume stage:
https://patchwork.kernel.org/project/imx/patch/20251202084524.208045-1-xu.yang_2@xxxxxxx/

When tcpm kthread call lpi2c xfer after pm_runtime_force_suspend() or before pm_runtime_force_resume(), because pm_runtime_resume_and_get() return 0 in 6.18 (but it return -13 in 6.12)in lpi2c_imx_master_enable(), so in 6.18 LPI2C will continue to write register but LPI2C ipg clk has stopped, it caused system hang.

How can I do to fix this? Can you help me some?

Best Regard
Carlos Song