diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2023-10-11 11:18:17 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-10-13 13:13:30 +0300 |
commit | 1a5361189b7acac15b9b086b2300a11b7aa84c06 (patch) | |
tree | 38c92384e787922120819c4c7e330886cb792baa | |
parent | aa4c0bbf820ddb9dd8105a403aa12df57b9e5129 (diff) | |
download | linux-1a5361189b7acac15b9b086b2300a11b7aa84c06.tar.xz |
phy: renesas: r8a779f0-ether-serdes: Add .exit() ops
Add r8a779f0_eth_serdes_exit() to clear the initialized flag
for re-initializing this PHY if needed.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20231011081817.257113-3-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r-- | drivers/phy/renesas/r8a779f0-ether-serdes.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/phy/renesas/r8a779f0-ether-serdes.c b/drivers/phy/renesas/r8a779f0-ether-serdes.c index ba1109d6bdd9..fc6e398fa3bf 100644 --- a/drivers/phy/renesas/r8a779f0-ether-serdes.c +++ b/drivers/phy/renesas/r8a779f0-ether-serdes.c @@ -261,6 +261,15 @@ static int r8a779f0_eth_serdes_init(struct phy *p) return ret; } +static int r8a779f0_eth_serdes_exit(struct phy *p) +{ + struct r8a779f0_eth_serdes_channel *channel = phy_get_drvdata(p); + + channel->dd->initialized = false; + + return 0; +} + static int r8a779f0_eth_serdes_hw_init_late(struct r8a779f0_eth_serdes_channel *channel) { @@ -318,6 +327,7 @@ static int r8a779f0_eth_serdes_set_speed(struct phy *p, int speed) static const struct phy_ops r8a779f0_eth_serdes_ops = { .init = r8a779f0_eth_serdes_init, + .exit = r8a779f0_eth_serdes_exit, .power_on = r8a779f0_eth_serdes_power_on, .set_mode = r8a779f0_eth_serdes_set_mode, .set_speed = r8a779f0_eth_serdes_set_speed, |