.init is used for PHY's initialization, and .power_on/power_off are only used for clock on and off. Signed-off-by: Peter Chen <peter.chen@xxxxxxx> --- drivers/phy/cadence/phy-cadence-salvo.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/phy/cadence/phy-cadence-salvo.c b/drivers/phy/cadence/phy-cadence-salvo.c index fa666527356d..c2b6ddfe02e0 100644 --- a/drivers/phy/cadence/phy-cadence-salvo.c +++ b/drivers/phy/cadence/phy-cadence-salvo.c @@ -206,7 +206,7 @@ static struct cdns_reg_pairs cdns_nxp_sequence_pair[] = { }; -static int cdns_salvo_phy_power_on(struct phy *phy) +static int cdns_salvo_phy_init(struct phy *phy) { struct cdns_salvo_phy *salvo_phy = phy_get_drvdata(phy); struct cdns_salvo_data *data = salvo_phy->data; @@ -231,9 +231,18 @@ static int cdns_salvo_phy_power_on(struct phy *phy) udelay(10); + clk_disable_unprepare(salvo_phy->clk); + return ret; } +static int cdns_salvo_phy_power_on(struct phy *phy) +{ + struct cdns_salvo_phy *salvo_phy = phy_get_drvdata(phy); + + return clk_prepare_enable(salvo_phy->clk); +} + static int cdns_salvo_phy_power_off(struct phy *phy) { struct cdns_salvo_phy *salvo_phy = phy_get_drvdata(phy); @@ -244,6 +253,7 @@ static int cdns_salvo_phy_power_off(struct phy *phy) } static struct phy_ops cdns_salvo_phy_ops = { + .init = cdns_salvo_phy_init, .power_on = cdns_salvo_phy_power_on, .power_off = cdns_salvo_phy_power_off, .owner = THIS_MODULE, -- 2.17.1