From: Fabio Estevam <festevam@gmail.com>
To: davem@davemloft.net
Cc: shawn.guo@linaro.org, olof@lixom.net, linux@arm.linux.org.uk,
netdev@vger.kernel.org,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH] fec: Revert "fec: Do not assume that PHY reset is active low"
Date: Sun, 5 Jan 2014 22:08:25 -0200 [thread overview]
Message-ID: <1388966905-8092-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@freescale.com>
In order to keep DT compatibility we need to revert this, otherwise the original
dts files will no longer work with this driver change.
This reverts commit 7a399e3a2e05bc580a78ea72371b3896827f72e1.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
David,
We need this for 3.13.
Sorry for the breakage.
drivers/net/ethernet/freescale/fec_main.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 45b8b22..50bb71c 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2049,8 +2049,6 @@ static void fec_reset_phy(struct platform_device *pdev)
int err, phy_reset;
int msec = 1;
struct device_node *np = pdev->dev.of_node;
- enum of_gpio_flags flags;
- bool port;
if (!np)
return;
@@ -2060,22 +2058,18 @@ static void fec_reset_phy(struct platform_device *pdev)
if (msec > 1000)
msec = 1;
- phy_reset = of_get_named_gpio_flags(np, "phy-reset-gpios", 0, &flags);
+ phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0);
if (!gpio_is_valid(phy_reset))
return;
- if (flags & OF_GPIO_ACTIVE_LOW)
- port = GPIOF_OUT_INIT_LOW;
- else
- port = GPIOF_OUT_INIT_HIGH;
-
- err = devm_gpio_request_one(&pdev->dev, phy_reset, port, "phy-reset");
+ err = devm_gpio_request_one(&pdev->dev, phy_reset,
+ GPIOF_OUT_INIT_LOW, "phy-reset");
if (err) {
dev_err(&pdev->dev, "failed to get phy-reset-gpios: %d\n", err);
return;
}
msleep(msec);
- gpio_set_value(phy_reset, !port);
+ gpio_set_value(phy_reset, 1);
}
#else /* CONFIG_OF */
static void fec_reset_phy(struct platform_device *pdev)
--
1.8.1.2
next reply other threads:[~2014-01-06 0:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 0:08 Fabio Estevam [this message]
2014-01-06 1:24 ` [PATCH] fec: Revert "fec: Do not assume that PHY reset is active low" David Miller
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=1388966905-8092-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=davem@davemloft.net \
--cc=fabio.estevam@freescale.com \
--cc=linux@arm.linux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olof@lixom.net \
--cc=shawn.guo@linaro.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).