net: mdio: rename mdio_device reset to reset_gpio
authorDavid Bauer <mail@david-bauer.net>
Wed, 17 Apr 2019 21:59:22 +0000 (23:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2019 00:42:54 +0000 (17:42 -0700)
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: David Bauer <mail@david-bauer.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/at803x.c
drivers/net/phy/mdio_bus.c
drivers/net/phy/mdio_device.c
include/linux/mdio.h

index 406111753f7c18673968bf63007d44e237aa7d4a..222ccd9ecfcebc0bf92beb82e177fba7c3bfaea5 100644 (file)
@@ -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
         * 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;
 
                at803x_context_save(phydev, &context);
index ba3d2523808baef3cf4595b1be142c512acfe1de..bd04fe762056f49c5c28ac3256df820e0e7544ec 100644 (file)
@@ -56,7 +56,7 @@ static int mdiobus_register_gpiod(struct mdio_device *mdiodev)
                        return PTR_ERR(gpiod);
        }
 
-       mdiodev->reset = gpiod;
+       mdiodev->reset_gpio = gpiod;
 
        return 0;
 }
@@ -469,8 +469,8 @@ void mdiobus_unregister(struct mii_bus *bus)
                if (!mdiodev)
                        continue;
 
-               if (mdiodev->reset)
-                       gpiod_put(mdiodev->reset);
+               if (mdiodev->reset_gpio)
+                       gpiod_put(mdiodev->reset_gpio);
 
                mdiodev->device_remove(mdiodev);
                mdiodev->device_free(mdiodev);
index 57668e0f9256797591bf13c7200fb9ae360fe342..e282600bd83e269e7d91973599e7b7f0329da12e 100644 (file)
@@ -117,11 +117,11 @@ void mdio_device_reset(struct mdio_device *mdiodev, int value)
 {
        unsigned int d;
 
-       if (!mdiodev->reset && !mdiodev->reset_ctrl)
+       if (!mdiodev->reset_gpio && !mdiodev->reset_ctrl)
                return;
 
-       if (mdiodev->reset)
-               gpiod_set_value(mdiodev->reset, value);
+       if (mdiodev->reset_gpio)
+               gpiod_set_value(mdiodev->reset_gpio, value);
 
        if (mdiodev->reset_ctrl) {
                if (value)
index 6eaf71500ef6e0181242422c2adab7b326ba4859..9dc16d5705a1e2324960d03e8b791e50ac5a5d40 100644 (file)
@@ -39,7 +39,7 @@ struct mdio_device {
        /* Bus address of the MDIO device (0-31) */
        int addr;
        int flags;
-       struct gpio_desc *reset;
+       struct gpio_desc *reset_gpio;
        struct reset_control *reset_ctrl;
        unsigned int reset_assert_delay;
        unsigned int reset_deassert_delay;