summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorGirish S Ghongdemath <girishsg@codeaurora.org>2014-02-05 15:04:04 -0800
committerGirish S Ghongdemath <girishsg@codeaurora.org>2014-02-28 10:15:29 -0800
commita489f45b89bbdb88faabcc1fab480ed9e6da8bf0 (patch)
treec33b5684410b20801dede443d4849214a6e8af5d /drivers/tty
parent7198e5fbd2a506a12fc0d5b6c5e4f63c060abf5e (diff)
tty: serial: msm_serial_hs: Enable/Disable uart irq over clk on/off
Keeping UART IRQ enabled all the time will gate XO shutdown in idle power collapse. Instead, handle enable/disable of irq within clk on/off functions. Also, making sure that wakeup irq is enabled before uart irq is disabled. CRs-Fixed: 606758 Change-Id: I5726fe6811e735ff3dac8d88ea86fd50fda0a61e Signed-off-by: Girish S Ghongdemath <girishsg@codeaurora.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/msm_serial_hs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c
index 2ad8d40b3293..8f66cd34c97e 100644
--- a/drivers/tty/serial/msm_serial_hs.c
+++ b/drivers/tty/serial/msm_serial_hs.c
@@ -2204,6 +2204,12 @@ static int msm_hs_check_clock_off(struct uart_port *uport)
if (use_low_power_wakeup(msm_uport)) {
msm_uport->wakeup.ignore = 1;
enable_irq(msm_uport->wakeup.irq);
+ /*
+ * keeping uport-irq enabled all the time
+ * gates XO shutdown in idle power collapse. Disable
+ * this only when wakeup irq is set.
+ */
+ disable_irq(uport->irq);
}
wake_unlock(&msm_uport->dma_wake_lock);
@@ -2412,8 +2418,11 @@ void msm_hs_request_clock_on(struct uart_port *uport)
switch (msm_uport->clk_state) {
case MSM_HS_CLK_OFF:
wake_lock(&msm_uport->dma_wake_lock);
- if (use_low_power_wakeup(msm_uport))
+ if (use_low_power_wakeup(msm_uport)) {
disable_irq_nosync(msm_uport->wakeup.irq);
+ /* uport-irq was disabled when clocked off */
+ enable_irq(uport->irq);
+ }
spin_unlock_irqrestore(&uport->lock, flags);
ret = msm_hs_clock_vote(msm_uport);