[PATCH v2 3/4] phy: freescale: fsl-samsung-hdmi: Only gate APB clock in runtime PM

Can Peng pengcan at kylinos.cn
Mon Jul 20 23:47:51 PDT 2026


The APB clock is acquired with devm_clk_get_enabled(), so it remains
prepared until devres cleanup and runtime PM only needs to gate or ungate
it.

Using clk_prepare_enable() from runtime resume is also problematic when
the common clock framework runtime-resumes the provider device before
calling the PHY clock rate callbacks, because clk_set_rate() is executed
while holding the clock prepare lock.

Use clk_enable() and clk_disable() in the runtime PM callbacks so the APB
clock remains prepared for the lifetime of the device and runtime resume
does not re-enter the prepare path.

Fixes: 6ad082bee902 ("phy: freescale: add Samsung HDMI PHY")
Cc: stable at vger.kernel.org
Signed-off-by: Can Peng <pengcan at kylinos.cn>
---
 drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
index 5f41890bd134..455d03220b72 100644
--- a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
+++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
@@ -706,7 +706,7 @@ static int __maybe_unused fsl_samsung_hdmi_phy_suspend(struct device *dev)
 {
 	struct fsl_samsung_hdmi_phy *phy = dev_get_drvdata(dev);
 
-	clk_disable_unprepare(phy->apbclk);
+	clk_disable(phy->apbclk);
 
 	return 0;
 }
@@ -716,7 +716,7 @@ static int __maybe_unused fsl_samsung_hdmi_phy_resume(struct device *dev)
 	struct fsl_samsung_hdmi_phy *phy = dev_get_drvdata(dev);
 	int ret = 0;
 
-	ret = clk_prepare_enable(phy->apbclk);
+	ret = clk_enable(phy->apbclk);
 	if (ret) {
 		dev_err(phy->dev, "failed to enable apbclk\n");
 		return ret;
-- 
2.53.0




More information about the linux-phy mailing list