Commit 2e174c33 authored by Shawn Guo's avatar Shawn Guo

serial: mxs-auart: adopt pinctrl support

Cc: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
parent 258e0551
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/pinctrl/consumer.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
...@@ -678,6 +679,7 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev) ...@@ -678,6 +679,7 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev)
u32 version; u32 version;
int ret = 0; int ret = 0;
struct resource *r; struct resource *r;
struct pinctrl *pinctrl;
s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL); s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL);
if (!s) { if (!s) {
...@@ -685,6 +687,12 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev) ...@@ -685,6 +687,12 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev)
goto out; goto out;
} }
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(pinctrl)) {
ret = PTR_ERR(pinctrl);
goto out_free;
}
s->clk = clk_get(&pdev->dev, NULL); s->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(s->clk)) { if (IS_ERR(s->clk)) {
ret = PTR_ERR(s->clk); ret = PTR_ERR(s->clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment