All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: freescale: fsl-samsung-hdmi: Balance runtime PM operations
@ 2026-07-29 19:28 Fabio Estevam
  2026-07-29 19:37 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2026-07-29 19:28 UTC (permalink / raw)
  To: vkoul; +Cc: neil.armstrong, linux-phy, Fabio Estevam

From: Fabio Estevam <festevam@nabladev.com>

fsl_samsung_hdmi_phy_probe() enables runtime PM, but the remove
callback does not disable it. Unbinding and rebinding the device
therefore results in the following warning on reprobe:

Unbalanced pm_runtime_enable!

Disable runtime PM after removing the clock provider.

Also undo the runtime PM operations when phy_clk_register() fails.
Otherwise, a failed probe leaves runtime PM enabled and the usage
counter incremented.

Signed-off-by: Fabio Estevam <festevam@nabladev.com>
---
 drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
index d010fec15671..0f25d81de61b 100644
--- a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
+++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
@@ -679,12 +679,15 @@ static int fsl_samsung_hdmi_phy_probe(struct platform_device *pdev)
 	return 0;
 
 register_clk_failed:
+	pm_runtime_disable(phy->dev);
+	pm_runtime_put_noidle(phy->dev);
 	return ret;
 }
 
 static void fsl_samsung_hdmi_phy_remove(struct platform_device *pdev)
 {
 	of_clk_del_provider(pdev->dev.of_node);
+	pm_runtime_disable(&pdev->dev);
 }
 
 static int __maybe_unused fsl_samsung_hdmi_phy_suspend(struct device *dev)
-- 
2.43.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-29 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 19:28 [PATCH] phy: freescale: fsl-samsung-hdmi: Balance runtime PM operations Fabio Estevam
2026-07-29 19:37 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.