Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3244fcd2 authored by Kevin Hilman's avatar Kevin Hilman
Browse files

OMAP: UART: don't do automatic bus-level suspend/resume



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: default avatarGovindraj.R <govindraj.raja@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent c04ede38
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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,16 +531,19 @@ 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);
		}
	}
}

static ssize_t sleep_timeout_show(struct device *dev,
				  struct device_attribute *attr,