Skip to contentSkip to conversation

phy: freescale: phy-fsl-imx8qm-lvds-phy: Use synchronous PM runtime put in reset

PATCH Applied Felix Gu 3 participants 3 messages Jun 9 – Jun 11

Subsystems (2)
lore
Share & tools
lore

Felix Gu

author
#0 lore raw

PATCH 1/1 phy: freescale: phy-fsl-imx8qm-lvds-phy: Use synchronous PM runtime put in reset

The mixel_lvds_phy_reset() function pairs pm_runtime_resume_and_get() with pm_runtime_put(). The asynchronous variant queues a work item to handle the idle check and potential suspend, which can be cancelled by a subsequent pm_runtime_disable() call if probe fails after the reset.

Switch to pm_runtime_put_sync() to run the idle check and suspend synchronously.

Fixes 06ff622d61d2 ("phy: freescale: Add i.MX8qm Mixel LVDS PHY support")
---
 drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c +1 -1
index ece357443521..e2a1645000ae 100644
@@ -286,7 +286,7 @@ static int mixel_lvds_phy_reset(struct device *dev)
 
 	regmap_write(priv->regmap, PHY_CTRL, CTRL_RESET_VAL);
 
-	pm_runtime_put(dev);
+	pm_runtime_put_sync(dev);
 
 	return 0;
 }

---
base-commit: a87737435cfa134f9cdcc696ba3080759d04cf72
change-id: 20260609-lvds-phy-6328389a2cf1

Best regards,

Signature · 1 line
Felix Gu <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Felix Gu

The mixel_lvds_phy_reset() function pairs pm_runtime_resume_and_get() with pm_runtime_put(). The asynchronous variant queues a work item to handle the idle check and potential suspend, which can be cancelled by a subsequent pm_runtime_disable() call if probe fails after the reset.

Quoted 8 lines

Switch to pm_runtime_put_sync() to run the idle check and suspend synchronously.

Fixes 06ff622d61d2 ("phy: freescale: Add i.MX8qm Mixel LVDS PHY support")

---

Quoted 26 lines
 drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c +1 -2
index ece357443521..e2a1645000ae 100644
@@ -286,7 +286,7 @@ static int mixel_lvds_phy_reset(struct device *dev)
 
        regmap_write(priv->regmap, PHY_CTRL, CTRL_RESET_VAL);
 
-       pm_runtime_put(dev);
+       pm_runtime_put_sync(dev);
 
        return 0;
 }
 
---

base-commit: a87737435cfa134f9cdcc696ba3080759d04cf72
change-id: 20260609-lvds-phy-6328389a2cf1

Best regards,
--
Felix Gu <[email protected]>

maintainer Applied
#2 lore raw
In reply to Felix Gu
Quoted 9 lines · Felix Gu

The mixel_lvds_phy_reset() function pairs pm_runtime_resume_and_get() with pm_runtime_put(). The asynchronous variant queues a work item to handle the idle check and potential suspend, which can be cancelled by a subsequent pm_runtime_disable() call if probe fails after the reset.

Switch to pm_runtime_put_sync() to run the idle check and suspend synchronously.

[...]

Applied, thanks!

[1/1] phy: freescale: phy-fsl-imx8qm-lvds-phy: Use synchronous PM runtime put in reset

      commit: b28ec8ce03d8f9a0f7a9ec84f1ed9b5a6f393791

Best regards,

Signature · 1 line
~Vinod