From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] net: fec: adopt pinctrl API
Date: Sun, 6 May 2012 20:58:11 +0800 [thread overview]
Message-ID: <1336309094-18517-3-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1336309094-18517-1-git-send-email-shawn.guo@linaro.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/net/ethernet/freescale/fec.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index a12b3f5..500c106 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -48,6 +48,7 @@
#include <linux/of_device.h>
#include <linux/of_gpio.h>
#include <linux/of_net.h>
+#include <linux/pinctrl/consumer.h>
#include <asm/cacheflush.h>
@@ -1542,6 +1543,7 @@ fec_probe(struct platform_device *pdev)
struct resource *r;
const struct of_device_id *of_id;
static int dev_id;
+ struct pinctrl *pinctrl;
of_id = of_match_device(fec_dt_ids, &pdev->dev);
if (of_id)
@@ -1609,6 +1611,12 @@ fec_probe(struct platform_device *pdev)
}
}
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl)) {
+ ret = PTR_ERR(pinctrl);
+ goto failed_pin;
+ }
+
fep->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(fep->clk)) {
ret = PTR_ERR(fep->clk);
@@ -1639,6 +1647,7 @@ failed_mii_init:
failed_init:
clk_disable_unprepare(fep->clk);
clk_put(fep->clk);
+failed_pin:
failed_clk:
for (i = 0; i < FEC_IRQ_NUM; i++) {
irq = platform_get_irq(pdev, i);
--
1.7.5.4
next prev parent reply other threads:[~2012-05-06 12:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-06 12:58 [PATCH 0/5] Adopt pinctrl API for a few outstanding imx drivers Shawn Guo
2012-05-06 12:58 ` [PATCH 1/5] tty: serial: imx: adopt pinctrl API Shawn Guo
2012-05-06 13:47 ` Shawn Guo
2012-05-06 12:58 ` Shawn Guo [this message]
2012-05-06 16:46 ` [PATCH 2/5] net: fec: " David Miller
2012-05-07 0:41 ` Shawn Guo
2012-05-06 17:26 ` Steven King
2012-05-07 0:46 ` Shawn Guo
2012-05-06 12:58 ` [PATCH 3/5] can: flexcan: " Shawn Guo
2012-05-06 12:58 ` [PATCH 4/5] i2c: imx: " Shawn Guo
2012-05-06 12:58 ` [PATCH 5/5] spi/imx: " Shawn Guo
2012-05-06 13:45 ` [PATCH 0/5] Adopt pinctrl API for a few outstanding imx drivers Shawn Guo
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=1336309094-18517-3-git-send-email-shawn.guo@linaro.org \
--to=shawn.guo@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).