linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial/core: Initialize the console pm state
@ 2014-09-22  6:30 Sudhir Sreedharan
  2014-10-01 17:27 ` Kevin Hilman
  0 siblings, 1 reply; 18+ messages in thread
From: Sudhir Sreedharan @ 2014-09-22  6:30 UTC (permalink / raw)
  To: linux-serial; +Cc: gregkh, jslaby, linux-kernel, Sudhir Sreedharan

For console devices having UART_CAP_SLEEP capability, the uart_pm_state has
to be initialized to UART_PM_STATE_ON. Otherwise the LCR regiser values
are reinitialized when uart_change_pm is called from uart_configure_port.

Signed-off-by: Sudhir Sreedharan <ssreedharan@mvista.com>
---
 drivers/tty/serial/serial_core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 29a7be4..91bfd52 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2615,6 +2615,9 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
 	if (uport->cons && uport->dev)
 		of_console_check(uport->dev->of_node, uport->cons->name, uport->line);
 
+	if (uart_console(uport))
+		state->pm_state = UART_PM_STATE_ON;
+
 	uart_configure_port(drv, state, uport);
 
 	num_groups = 2;
-- 
1.7.0.1

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

end of thread, other threads:[~2014-10-21  6:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-22  6:30 [PATCH] serial/core: Initialize the console pm state Sudhir Sreedharan
2014-10-01 17:27 ` Kevin Hilman
2014-10-03  4:35   ` Greg KH
2014-10-03 12:22   ` Geert Uytterhoeven
2014-10-06  9:48     ` Sudhir Sreedharan
2014-10-06  9:27   ` Sudhir Sreedharan
2014-10-09 13:42     ` Sudhir Sreedharan
2014-10-09 13:45       ` [PATCH] tty: serial: 8250_core: Do not call set_sleep for console port Sudhir Sreedharan
2014-10-09 14:45         ` Peter Hurley
2014-10-15  6:43           ` [PATCH] tty: serial: 8250_core: restore the LCR register in set_sleep Sudhir Sreedharan
2014-10-16  7:21             ` Kevin Hilman
2014-10-16 10:15               ` Sudhir Sreedharan
2014-10-16 12:35             ` Peter Hurley
2014-10-17 10:25               ` Sudhir Sreedharan
2014-10-17 12:39                 ` [PATCH v1] " Sudhir Sreedharan
2014-10-17 12:46                   ` Peter Hurley
2014-10-20 15:01                   ` Kevin Hilman
2014-10-21  6:45                     ` Sudhir Sreedharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).