ethernet: stmmac: Release reset gpio desc for mdio reset

For some PHYs, it is necessary to reset the PHY after waking up from
sleep to ensure that it works properly.

Change-Id: I629c12096060c8b5ac1a33dfd5a90a85adddec44
Signed-off-by: David Wu <david.wu@rock-chips.com>
This commit is contained in:
David Wu
2024-03-28 11:28:18 +08:00
committed by Tao Huang
parent 04f2f036ba
commit 72834b57d9

View File

@@ -375,6 +375,9 @@ int stmmac_mdio_reset(struct mii_bus *bus)
gpiod_set_value_cansleep(reset_gpio, 0);
if (delays[2])
msleep(DIV_ROUND_UP(delays[2], 1000));
/* put reset gpio resource for next time */
devm_gpiod_put(priv->device, reset_gpio);
}
#endif