linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/11] OMAP: UART: don't do automatic bus-level suspend/resume
@ 2010-09-17 16:07 Govindraj.R
  0 siblings, 0 replies; only message in thread
From: Govindraj.R @ 2010-09-17 16:07 UTC (permalink / raw)
  To: linux-omap; +Cc: linux-arm-kernel, linux-serial, Kevin Hilman, Tony Lindgren

From: Kevin Hilman <khilman@deeprootsystems.com>

Since the omap_device for UART is currently managed inside the idle
path itself,  don't let the bus-level code suspend/resume the UART.

To prevent this, pm_runtime_get() is used when preparing for suspend
and pm_runtime_put() is used when finished with suspend.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/serial.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index ae1bc63..b47194a 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -26,6 +26,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/serial_8250.h>
+#include <linux/pm_runtime.h>

 #ifdef CONFIG_SERIAL_OMAP
 #include <plat/omap-serial.h>
@@ -530,14 +531,17 @@ void omap_uart_enable_irqs(int enable)
 	struct omap_uart_state *uart;

 	list_for_each_entry(uart, &uart_list, node) {
-		if (enable)
+		if (enable) {
+			pm_runtime_put_sync(&uart->pdev->dev);
 			ret = request_threaded_irq(uart->irq, NULL,
 						   omap_uart_interrupt,
 						   IRQF_SHARED,
 						   "serial idle",
 						   (void *)uart);
-		else
+		} else {
+			pm_runtime_get_noresume(&uart->pdev->dev);
 			free_irq(uart->irq, (void *)uart);
+		}
 	}
 }

-- 
1.6.3.3






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-17 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-17 16:07 [PATCH 05/11] OMAP: UART: don't do automatic bus-level suspend/resume Govindraj.R

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).