diff options
Diffstat (limited to 'drivers/tty/serial/samsung.c')
-rw-r--r-- | drivers/tty/serial/samsung.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 0026196..c7de749 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -448,6 +448,16 @@ static int s3c24xx_serial_startup(struct uart_port *port) /* power power management control */ +#ifdef CONFIG_CPU_DIDLE +static bool gps_running = false; + +bool gps_is_running(void) +{ + return gps_running; +} +EXPORT_SYMBOL(gps_is_running); +#endif + static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level, unsigned int old) { @@ -462,13 +472,21 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level, if (!IS_ERR(ourport->baudclk) && ourport->baudclk != NULL) clk_disable(ourport->baudclk); - +#ifdef CONFIG_CPU_DIDLE + if (ourport->port.irq == IRQ_S3CUART_RX1) + gps_running = false; +#endif clk_disable(ourport->clk); + break; case 0: - clk_enable(ourport->clk); + clk_enable(ourport->clk); +#ifdef CONFIG_CPU_DIDLE + if (ourport->port.irq == IRQ_S3CUART_RX1) + gps_running = true; +#endif if (!IS_ERR(ourport->baudclk) && ourport->baudclk != NULL) clk_enable(ourport->baudclk); |