[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250421062341.2471922-1-carlos.song@nxp.com>
Date: Mon, 21 Apr 2025 14:23:41 +0800
From: carlos.song@....com
To: aisheng.dong@....com,
frank.li@....com,
andi.shyti@...nel.org,
shawnguo@...nel.org,
s.hauer@...gutronix.de,
kernel@...gutronix.de,
festevam@...il.com
Cc: linux-i2c@...r.kernel.org,
imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] i2c: imx-lpi2c: Fix clock count when probe defers
From: Clark Wang <xiaoning.wang@....com>
Deferred probe with pm_runtime_put() may delay clock disable, causing
incorrect clock usage count. Use pm_runtime_put_sync() to ensure the
clock is disabled immediately.
Signed-off-by: Carlos Song <carlos.song@....com>
Signed-off-by: Clark Wang <xiaoning.wang@....com>
Signed-off-by: Jun Li <jun.li@....com>
Signed-off-by: Haibo Chen <haibo.chen@....com>
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index 0d4b3935e687..342d47e67586 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -1380,9 +1380,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
return 0;
rpm_disable:
- pm_runtime_put(&pdev->dev);
- pm_runtime_disable(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
+ pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
return ret;
}
--
2.34.1
Powered by blists - more mailing lists