public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver
@ 2013-08-08 13:31 John Crispin
  2013-08-08 13:31 ` [PATCH 2/2] serial: MIPS: lantiq: make driver use pinctrl John Crispin
  2013-08-08 14:47 ` [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver James Hogan
  0 siblings, 2 replies; 5+ messages in thread
From: John Crispin @ 2013-08-08 13:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-serial, linux-mips, Thomas Langer

From: Thomas Langer <thomas.langer@lantiq.com>

Enable the clock if one is present when setting up the console.

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

diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index 15733da..ce1ea35 100644
--- a/drivers/tty/serial/lantiq.c
+++ b/drivers/tty/serial/lantiq.c
@@ -636,6 +636,9 @@ lqasc_console_setup(struct console *co, char *options)
 
 	port = &ltq_port->port;
 
+	if (ltq_port->clk)
+		clk_enable(ltq_port->clk);
+
 	port->uartclk = clk_get_rate(ltq_port->fpiclk);
 
 	if (options)
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] serial: MIPS: lantiq: make driver use pinctrl
  2013-08-08 13:31 [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver John Crispin
@ 2013-08-08 13:31 ` John Crispin
  2013-08-08 14:50   ` James Hogan
  2013-08-08 14:47 ` [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver James Hogan
  1 sibling, 1 reply; 5+ messages in thread
From: John Crispin @ 2013-08-08 13:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-serial, linux-mips, Thomas Langer

From: Thomas Langer <thomas.langer@lantiq.com>

Add use of devm_pinctrl_get_select_default to active default pinctrl settings.

Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
Acked-by: John Crispin <blogic@openwrt.org>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver
  2013-08-08 13:31 [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver John Crispin
  2013-08-08 13:31 ` [PATCH 2/2] serial: MIPS: lantiq: make driver use pinctrl John Crispin
@ 2013-08-08 14:47 ` James Hogan
  2013-08-08 14:56   ` John Crispin
  1 sibling, 1 reply; 5+ messages in thread
From: James Hogan @ 2013-08-08 14:47 UTC (permalink / raw)
  To: John Crispin; +Cc: Greg Kroah-Hartman, linux-serial, linux-mips, Thomas Langer

On 08/08/13 14:31, John Crispin wrote:
> From: Thomas Langer <thomas.langer@lantiq.com>
> 
> Enable the clock if one is present when setting up the console.
> 
> Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
> Acked-by: John Crispin <blogic@openwrt.org>
> ---
>  drivers/tty/serial/lantiq.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
> index 15733da..ce1ea35 100644
> --- a/drivers/tty/serial/lantiq.c
> +++ b/drivers/tty/serial/lantiq.c
> @@ -636,6 +636,9 @@ lqasc_console_setup(struct console *co, char *options)
>  
>  	port = &ltq_port->port;
>  
> +	if (ltq_port->clk)

I think that should be !IS_ERR(ltq_port->clk)? The same problem appears
to be elsewhere in that file too.

Cheers
James


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] serial: MIPS: lantiq: make driver use pinctrl
  2013-08-08 13:31 ` [PATCH 2/2] serial: MIPS: lantiq: make driver use pinctrl John Crispin
@ 2013-08-08 14:50   ` James Hogan
  0 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2013-08-08 14:50 UTC (permalink / raw)
  To: John Crispin; +Cc: Greg Kroah-Hartman, linux-serial, linux-mips, Thomas Langer

On 08/08/13 14:31, John Crispin wrote:
> From: Thomas Langer <thomas.langer@lantiq.com>
> 
> Add use of devm_pinctrl_get_select_default to active default pinctrl settings.
> 
> Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
> Acked-by: John Crispin <blogic@openwrt.org>
> ---
>  drivers/tty/serial/lantiq.c |    7 +++++++
>  1 file changed, 7 insertions(+)


> @@ -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");

I believe since v3.9 (specifically commit ab78029) this happens
automatically.

Cheers
James


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver
  2013-08-08 14:47 ` [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver James Hogan
@ 2013-08-08 14:56   ` John Crispin
  0 siblings, 0 replies; 5+ messages in thread
From: John Crispin @ 2013-08-08 14:56 UTC (permalink / raw)
  To: James Hogan; +Cc: Greg Kroah-Hartman, linux-serial, linux-mips, Thomas Langer

On 08/08/13 16:47, James Hogan wrote:
> On 08/08/13 14:31, John Crispin wrote:
>> From: Thomas Langer<thomas.langer@lantiq.com>
>>
>> Enable the clock if one is present when setting up the console.
>>
>> Signed-off-by: Thomas Langer<thomas.langer@lantiq.com>
>> Acked-by: John Crispin<blogic@openwrt.org>
>> ---
>>   drivers/tty/serial/lantiq.c |    3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
>> index 15733da..ce1ea35 100644
>> --- a/drivers/tty/serial/lantiq.c
>> +++ b/drivers/tty/serial/lantiq.c
>> @@ -636,6 +636,9 @@ lqasc_console_setup(struct console *co, char *options)
>>
>>   	port =&ltq_port->port;
>>
>> +	if (ltq_port->clk)
> I think that should be !IS_ERR(ltq_port->clk)? The same problem appears
> to be elsewhere in that file too.
>
> Cheers
> James
>
>


Thanks, i will send an updated series


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-08 15:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08 13:31 [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver John Crispin
2013-08-08 13:31 ` [PATCH 2/2] serial: MIPS: lantiq: make driver use pinctrl John Crispin
2013-08-08 14:50   ` James Hogan
2013-08-08 14:47 ` [PATCH 1/2] serial: MIPS: lantiq: add clk_enable() call to driver James Hogan
2013-08-08 14:56   ` John Crispin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox