From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] tty: serial: imx: adopt pinctrl API
Date: Sun, 6 May 2012 20:58:10 +0800 [thread overview]
Message-ID: <1336309094-18517-2-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1336309094-18517-1-git-send-email-shawn.guo@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/tty/serial/imx.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index e7fecee..ec20673 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -47,6 +47,7 @@
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_device.h>
+#include <linux/pinctrl/consumer.h>
#include <asm/io.h>
#include <asm/irq.h>
@@ -1464,6 +1465,7 @@ static int serial_imx_probe(struct platform_device *pdev)
void __iomem *base;
int ret = 0;
struct resource *res;
+ struct pinctrl *pinctrl;
sport = kzalloc(sizeof(*sport), GFP_KERNEL);
if (!sport)
@@ -1503,6 +1505,12 @@ static int serial_imx_probe(struct platform_device *pdev)
sport->timer.function = imx_timeout;
sport->timer.data = (unsigned long)sport;
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl)) {
+ ret = PTR_ERR(pinctrl);
+ goto unmap;
+ }
+
sport->clk = clk_get(&pdev->dev, "uart");
if (IS_ERR(sport->clk)) {
ret = PTR_ERR(sport->clk);
--
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 ` Shawn Guo [this message]
2012-05-06 13:47 ` [PATCH 1/5] tty: serial: imx: adopt pinctrl API Shawn Guo
2012-05-06 12:58 ` [PATCH 2/5] net: fec: " Shawn Guo
2012-05-06 16:46 ` 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-2-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).