devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Bauer <mail@david-bauer.net>
To: devicetree@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH 3/3] net: mdio: rename mdio_device reset to reset_gpio
Date: Mon, 15 Apr 2019 14:38:40 +0200	[thread overview]
Message-ID: <20190415123840.31407-3-mail@david-bauer.net> (raw)
In-Reply-To: <20190415123840.31407-1-mail@david-bauer.net>

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>
---
 drivers/net/phy/mdio_bus.c    | 6 +++---
 drivers/net/phy/mdio_device.c | 6 +++---
 include/linux/mdio.h          | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 7590645f19ef..d1087bd24c83 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -56,7 +56,7 @@ static int mdiobus_register_gpiod(struct mdio_device *mdiodev)
 			return PTR_ERR(gpiod);
 	}
 
-	mdiodev->reset = gpiod;
+	mdiodev->reset_gpio = gpiod;
 
 	/* Assert the reset signal again */
 	mdio_device_reset(mdiodev, 1);
@@ -471,8 +471,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);
diff --git a/drivers/net/phy/mdio_device.c b/drivers/net/phy/mdio_device.c
index 57668e0f9256..e282600bd83e 100644
--- a/drivers/net/phy/mdio_device.c
+++ b/drivers/net/phy/mdio_device.c
@@ -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)
diff --git a/include/linux/mdio.h b/include/linux/mdio.h
index 6eaf71500ef6..9dc16d5705a1 100644
--- a/include/linux/mdio.h
+++ b/include/linux/mdio.h
@@ -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;
-- 
2.21.0

  parent reply	other threads:[~2019-04-15 12:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 12:38 [PATCH 1/3] dt-bindings: net: add PHY reset controller binding David Bauer
2019-04-15 12:38 ` [PATCH 2/3] net: phy: add support for reset-controller David Bauer
2019-04-15 17:01   ` Andrew Lunn
2019-04-15 12:38 ` David Bauer [this message]
2019-04-15 17:02   ` [PATCH 3/3] net: mdio: rename mdio_device reset to reset_gpio Andrew Lunn
2019-04-15 23:04   ` kbuild test robot
2019-04-16  2:21   ` kbuild test robot
2019-04-16  2:29   ` kbuild test robot
2019-04-15 17:04 ` [PATCH 1/3] dt-bindings: net: add PHY reset controller binding Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190415123840.31407-3-mail@david-bauer.net \
    --to=mail@david-bauer.net \
    --cc=devicetree@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).