From: Abhash Kumar Jha <[email protected]> The driver currently calls phy_init()/phy_exit() but never phy_power_on()/phy_power_off().
Follow the PHY API guide's recommendation to call phy_power_on and phy_power_off along with phy_init and phy_exit respectively to be compatible with different PHYs. Signed-off-by: Abhash Kumar Jha <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Benjamin Robin <[email protected]> --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index f47717bd1079..86e850a4752d 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -2369,6 +2369,12 @@ static int cdns_mhdp_probe(struct platform_device *pdev) goto plat_fini; } + ret = phy_power_on(mhdp->phy); + if (ret < 0) { + dev_err(mhdp->dev, "Failed to power on PHY: %d\n", ret); + goto phy_exit; + } + /* Initialize the work for modeset in case of link train failure */ INIT_WORK(&mhdp->modeset_retry_work, cdns_mhdp_modeset_retry_fn); INIT_WORK(&mhdp->hpd_work, cdns_mhdp_hpd_work); @@ -2378,7 +2384,7 @@ static int cdns_mhdp_probe(struct platform_device *pdev) ret = cdns_mhdp_load_firmware(mhdp); if (ret) - goto phy_exit; + goto power_off; if (mhdp->hdcp_supported) cdns_mhdp_hdcp_init(mhdp); @@ -2387,6 +2393,8 @@ static int cdns_mhdp_probe(struct platform_device *pdev) return 0; +power_off: + phy_power_off(mhdp->phy); phy_exit: phy_exit(mhdp->phy); plat_fini: @@ -2424,6 +2432,7 @@ static void cdns_mhdp_remove(struct platform_device *pdev) ERR_PTR(ret)); } + phy_power_off(mhdp->phy); phy_exit(mhdp->phy); if (mhdp->info && mhdp->info->ops && mhdp->info->ops->exit) -- 2.56.1
