diff options
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 8 | ||||
-rw-r--r-- | drivers/tty/serial/imx.c | 8 | ||||
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 3d569cd68f58..062ef8c2b3cb 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/scatterlist.h> | 52 | #include <linux/scatterlist.h> |
53 | #include <linux/delay.h> | 53 | #include <linux/delay.h> |
54 | #include <linux/types.h> | 54 | #include <linux/types.h> |
55 | #include <linux/pinctrl/consumer.h> | ||
55 | 56 | ||
56 | #include <asm/io.h> | 57 | #include <asm/io.h> |
57 | #include <asm/sizes.h> | 58 | #include <asm/sizes.h> |
@@ -1916,6 +1917,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) | |||
1916 | { | 1917 | { |
1917 | struct uart_amba_port *uap; | 1918 | struct uart_amba_port *uap; |
1918 | struct vendor_data *vendor = id->data; | 1919 | struct vendor_data *vendor = id->data; |
1920 | struct pinctrl *pinctrl; | ||
1919 | void __iomem *base; | 1921 | void __iomem *base; |
1920 | int i, ret; | 1922 | int i, ret; |
1921 | 1923 | ||
@@ -1940,6 +1942,12 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) | |||
1940 | goto free; | 1942 | goto free; |
1941 | } | 1943 | } |
1942 | 1944 | ||
1945 | pinctrl = devm_pinctrl_get_select_default(&dev->dev); | ||
1946 | if (IS_ERR(pinctrl)) { | ||
1947 | ret = PTR_ERR(pinctrl); | ||
1948 | goto unmap; | ||
1949 | } | ||
1950 | |||
1943 | uap->clk = clk_get(&dev->dev, NULL); | 1951 | uap->clk = clk_get(&dev->dev, NULL); |
1944 | if (IS_ERR(uap->clk)) { | 1952 | if (IS_ERR(uap->clk)) { |
1945 | ret = PTR_ERR(uap->clk); | 1953 | ret = PTR_ERR(uap->clk); |
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 267ec6da5af2..4ef747307ecb 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> |
@@ -1465,6 +1466,7 @@ static int serial_imx_probe(struct platform_device *pdev) | |||
1465 | void __iomem *base; | 1466 | void __iomem *base; |
1466 | int ret = 0; | 1467 | int ret = 0; |
1467 | struct resource *res; | 1468 | struct resource *res; |
1469 | struct pinctrl *pinctrl; | ||
1468 | 1470 | ||
1469 | sport = kzalloc(sizeof(*sport), GFP_KERNEL); | 1471 | sport = kzalloc(sizeof(*sport), GFP_KERNEL); |
1470 | if (!sport) | 1472 | if (!sport) |
@@ -1504,6 +1506,12 @@ static int serial_imx_probe(struct platform_device *pdev) | |||
1504 | sport->timer.function = imx_timeout; | 1506 | sport->timer.function = imx_timeout; |
1505 | sport->timer.data = (unsigned long)sport; | 1507 | sport->timer.data = (unsigned long)sport; |
1506 | 1508 | ||
1509 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
1510 | if (IS_ERR(pinctrl)) { | ||
1511 | ret = PTR_ERR(pinctrl); | ||
1512 | goto unmap; | ||
1513 | } | ||
1514 | |||
1507 | sport->clk_ipg = devm_clk_get(&pdev->dev, "ipg"); | 1515 | sport->clk_ipg = devm_clk_get(&pdev->dev, "ipg"); |
1508 | if (IS_ERR(sport->clk_ipg)) { | 1516 | if (IS_ERR(sport->clk_ipg)) { |
1509 | ret = PTR_ERR(sport->clk_ipg); | 1517 | ret = PTR_ERR(sport->clk_ipg); |
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 55fd362b9879..7081600bede4 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/clk.h> | 32 | #include <linux/clk.h> |
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/pinctrl/consumer.h> | ||
35 | 36 | ||
36 | #include <asm/cacheflush.h> | 37 | #include <asm/cacheflush.h> |
37 | 38 | ||
@@ -678,6 +679,7 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev) | |||
678 | u32 version; | 679 | u32 version; |
679 | int ret = 0; | 680 | int ret = 0; |
680 | struct resource *r; | 681 | struct resource *r; |
682 | struct pinctrl *pinctrl; | ||
681 | 683 | ||
682 | s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL); | 684 | s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL); |
683 | if (!s) { | 685 | if (!s) { |
@@ -685,6 +687,12 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev) | |||
685 | goto out; | 687 | goto out; |
686 | } | 688 | } |
687 | 689 | ||
690 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
691 | if (IS_ERR(pinctrl)) { | ||
692 | ret = PTR_ERR(pinctrl); | ||
693 | goto out_free; | ||
694 | } | ||
695 | |||
688 | s->clk = clk_get(&pdev->dev, NULL); | 696 | s->clk = clk_get(&pdev->dev, NULL); |
689 | if (IS_ERR(s->clk)) { | 697 | if (IS_ERR(s->clk)) { |
690 | ret = PTR_ERR(s->clk); | 698 | ret = PTR_ERR(s->clk); |