phy: core: Add consumer device link support

In order to enforce suspend/resume ordering, this commit creates link
between phy consumers and phy devices. This link avoids to suspend phy
before phy consumers.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
[jonathanh@nvidia.com: Fix an abort when of_phy_get() returns error]
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
Alexandre Torgue
2019-11-04 15:37:13 +01:00
committed by Kishon Vijay Abraham I
parent 24dbe0aaa0
commit 987351e1ea
4 changed files with 53 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ static int usbhs_rcar2_hardware_exit(struct platform_device *pdev)
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
if (priv->phy) {
phy_put(priv->phy);
phy_put(&pdev->dev, priv->phy);
priv->phy = NULL;
}