diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-05-06 08:21:05 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-11 03:01:57 -0400 |
commit | fed78ce4c6af1c0d516ae6f4cdc2bb8dbbca8c22 (patch) | |
tree | ec3ba0c39cb7e5817f9a54005649e47e4a2d2636 | |
parent | e62d8b8fe73518d1875371a2ee9c5fdd31eba6f8 (diff) |
tty: serial: imx: adopt pinctrl support
Cc: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
-rw-r--r-- | 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 e7feceeebc2f..ec206732f68c 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/slab.h> | 47 | #include <linux/slab.h> |
48 | #include <linux/of.h> | 48 | #include <linux/of.h> |
49 | #include <linux/of_device.h> | 49 | #include <linux/of_device.h> |
50 | #include <linux/pinctrl/consumer.h> | ||
50 | 51 | ||
51 | #include <asm/io.h> | 52 | #include <asm/io.h> |
52 | #include <asm/irq.h> | 53 | #include <asm/irq.h> |
@@ -1464,6 +1465,7 @@ static int serial_imx_probe(struct platform_device *pdev) | |||
1464 | void __iomem *base; | 1465 | void __iomem *base; |
1465 | int ret = 0; | 1466 | int ret = 0; |
1466 | struct resource *res; | 1467 | struct resource *res; |
1468 | struct pinctrl *pinctrl; | ||
1467 | 1469 | ||
1468 | sport = kzalloc(sizeof(*sport), GFP_KERNEL); | 1470 | sport = kzalloc(sizeof(*sport), GFP_KERNEL); |
1469 | if (!sport) | 1471 | if (!sport) |
@@ -1503,6 +1505,12 @@ static int serial_imx_probe(struct platform_device *pdev) | |||
1503 | sport->timer.function = imx_timeout; | 1505 | sport->timer.function = imx_timeout; |
1504 | sport->timer.data = (unsigned long)sport; | 1506 | sport->timer.data = (unsigned long)sport; |
1505 | 1507 | ||
1508 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
1509 | if (IS_ERR(pinctrl)) { | ||
1510 | ret = PTR_ERR(pinctrl); | ||
1511 | goto unmap; | ||
1512 | } | ||
1513 | |||
1506 | sport->clk = clk_get(&pdev->dev, "uart"); | 1514 | sport->clk = clk_get(&pdev->dev, "uart"); |
1507 | if (IS_ERR(sport->clk)) { | 1515 | if (IS_ERR(sport->clk)) { |
1508 | ret = PTR_ERR(sport->clk); | 1516 | ret = PTR_ERR(sport->clk); |