diff options
author | Axel Haslam <axelhaslam@ti.com> | 2011-01-31 15:07:51 -0600 |
---|---|---|
committer | Dan Murphy <dmurphy@ti.com> | 2011-02-04 15:34:10 -0600 |
commit | 2390af1fd542db2036f8d76785ba1ebb1957b224 (patch) | |
tree | 00aead10305806044f15e4a51ff3c5a61e2b23ea /drivers/serial | |
parent | d99cd065cdf2e372dd0df1bd65f3171f0d73a250 (diff) |
OMAP4 SERIAL: Add conditions to hold a wakelock.
Hold the wakelock depending on the uart number,
and where we are trying to hold it from. With this,
the decision to hold (or not) a wakelock can be
made at the platform specific board file, and
adapted for specific scenarios.
Change-Id: Ib24e555a1a690b79766fac7bb026fabbba47dcce
Signed-off-by: Axel Haslam <axelhaslam@ti.com>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/omap-serial.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/serial/omap-serial.c b/drivers/serial/omap-serial.c index fdb852918b23..0a426353ac8d 100644 --- a/drivers/serial/omap-serial.c +++ b/drivers/serial/omap-serial.c @@ -221,7 +221,7 @@ ignore_char: * narios would handle these wake-locks. */ if (up->plat_hold_wakelock) - (up->plat_hold_wakelock()); + (up->plat_hold_wakelock(up, WAKELK_RX)); spin_unlock(&up->port.lock); tty_flip_buffer_push(tty); spin_lock(&up->port.lock); @@ -252,7 +252,7 @@ static void transmit_chars(struct uart_omap_port *up) * which require these. */ if (up->plat_hold_wakelock) - (up->plat_hold_wakelock()); + (up->plat_hold_wakelock(up, WAKELK_TX)); break; } } while (--count > 0); @@ -377,7 +377,7 @@ static inline irqreturn_t serial_omap_irq(int irq, void *dev_id) if (omap_is_console_port(&up->port) && (up->plat_hold_wakelock)) - (up->plat_hold_wakelock()); + (up->plat_hold_wakelock(up, WAKELK_IRQ)); #ifdef CONFIG_PM /* * This will enable the clock for some reason if the @@ -1102,7 +1102,7 @@ static int serial_omap_resume(struct platform_device *dev) if (omap_is_console_port(&up->port)) if (up->plat_hold_wakelock) - (up->plat_hold_wakelock()); + (up->plat_hold_wakelock(up, WAKELK_RESUME)); if (up) uart_resume_port(&serial_omap_reg, &up->port); @@ -1187,7 +1187,7 @@ static int serial_omap_start_rxdma(struct uart_omap_port *up) up->uart_dma.rx_dma_used = true; if (up->plat_hold_wakelock) - (up->plat_hold_wakelock()); + (up->plat_hold_wakelock(up, WAKELK_RX)); return ret; } @@ -1243,7 +1243,7 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data) up->uart_dma.tx_dma_used = false; spin_unlock(&(up->uart_dma.tx_lock)); if (up->plat_hold_wakelock) - (up->plat_hold_wakelock()); + (up->plat_hold_wakelock(up, WAKELK_TX)); } else { #ifdef CONFIG_PM |