[PATCH 2/2] serial: MIPS: lantiq: make driver use pinctrl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Thomas Langer <thomas.langer@xxxxxxxxxx>

Add use of devm_pinctrl_get_select_default to active default pinctrl settings.

Signed-off-by: Thomas Langer <thomas.langer@xxxxxxxxxx>
Acked-by: John Crispin <blogic@xxxxxxxxxxx>
---
 drivers/tty/serial/lantiq.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index ce1ea35..0dcaf3a 100644
--- a/drivers/tty/serial/lantiq.c
+++ b/drivers/tty/serial/lantiq.c
@@ -37,6 +37,8 @@
 #include <linux/io.h>
 #include <linux/clk.h>
 #include <linux/gpio.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/err.h>
 
 #include <lantiq_soc.h>
 
@@ -681,6 +683,7 @@ lqasc_probe(struct platform_device *pdev)
 	struct ltq_uart_port *ltq_port;
 	struct uart_port *port;
 	struct resource *mmres, irqres[3];
+	struct pinctrl *pinctrl;
 	int line = 0;
 	int ret;
 
@@ -719,6 +722,10 @@ lqasc_probe(struct platform_device *pdev)
 	port->irq	= irqres[0].start;
 	port->mapbase	= mmres->start;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl))
+		dev_warn(&pdev->dev, "pins are not configured from the driver\n");
+
 	ltq_port->fpiclk = clk_get_fpi();
 	if (IS_ERR(ltq_port->fpiclk)) {
 		pr_err("failed to get fpi clk\n");
-- 
1.7.10.4



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux