Commit 6110ed2d authored by David Bauer's avatar David Bauer Committed by David S. Miller

net: mdio: rename mdio_device reset to reset_gpio

This renames the GPIO reset of mdio devices from 'reset' to
'reset_gpio' to better differentiate between GPIO and
reset-controller driven reset line.
Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 71dd6c0d
...@@ -331,7 +331,7 @@ static void at803x_link_change_notify(struct phy_device *phydev) ...@@ -331,7 +331,7 @@ static void at803x_link_change_notify(struct phy_device *phydev)
* in the FIFO. In such cases, the FIFO enters an error mode it * in the FIFO. In such cases, the FIFO enters an error mode it
* cannot recover from by software. * cannot recover from by software.
*/ */
if (phydev->state == PHY_NOLINK && phydev->mdio.reset) { if (phydev->state == PHY_NOLINK && phydev->mdio.reset_gpio) {
struct at803x_context context; struct at803x_context context;
at803x_context_save(phydev, &context); at803x_context_save(phydev, &context);
......
...@@ -56,7 +56,7 @@ static int mdiobus_register_gpiod(struct mdio_device *mdiodev) ...@@ -56,7 +56,7 @@ static int mdiobus_register_gpiod(struct mdio_device *mdiodev)
return PTR_ERR(gpiod); return PTR_ERR(gpiod);
} }
mdiodev->reset = gpiod; mdiodev->reset_gpio = gpiod;
return 0; return 0;
} }
...@@ -469,8 +469,8 @@ void mdiobus_unregister(struct mii_bus *bus) ...@@ -469,8 +469,8 @@ void mdiobus_unregister(struct mii_bus *bus)
if (!mdiodev) if (!mdiodev)
continue; continue;
if (mdiodev->reset) if (mdiodev->reset_gpio)
gpiod_put(mdiodev->reset); gpiod_put(mdiodev->reset_gpio);
mdiodev->device_remove(mdiodev); mdiodev->device_remove(mdiodev);
mdiodev->device_free(mdiodev); mdiodev->device_free(mdiodev);
......
...@@ -117,11 +117,11 @@ void mdio_device_reset(struct mdio_device *mdiodev, int value) ...@@ -117,11 +117,11 @@ void mdio_device_reset(struct mdio_device *mdiodev, int value)
{ {
unsigned int d; unsigned int d;
if (!mdiodev->reset && !mdiodev->reset_ctrl) if (!mdiodev->reset_gpio && !mdiodev->reset_ctrl)
return; return;
if (mdiodev->reset) if (mdiodev->reset_gpio)
gpiod_set_value(mdiodev->reset, value); gpiod_set_value(mdiodev->reset_gpio, value);
if (mdiodev->reset_ctrl) { if (mdiodev->reset_ctrl) {
if (value) if (value)
......
...@@ -39,7 +39,7 @@ struct mdio_device { ...@@ -39,7 +39,7 @@ struct mdio_device {
/* Bus address of the MDIO device (0-31) */ /* Bus address of the MDIO device (0-31) */
int addr; int addr;
int flags; int flags;
struct gpio_desc *reset; struct gpio_desc *reset_gpio;
struct reset_control *reset_ctrl; struct reset_control *reset_ctrl;
unsigned int reset_assert_delay; unsigned int reset_assert_delay;
unsigned int reset_deassert_delay; unsigned int reset_deassert_delay;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment