diff options
| author | Jim Wylder <jwylder@motorola.com> | 2014-07-25 14:38:26 -0500 |
|---|---|---|
| committer | James Wylder <jwylder@motorola.com> | 2014-07-26 01:12:56 +0000 |
| commit | e451e3daf417f5000f2ff102e5a61b2efd12e579 (patch) | |
| tree | c1528d10ffeccda453164dff90ca4a10a412d159 | |
| parent | ff8cba0e8b3353d8a44e9f1a72083ca4b0e7897a (diff) | |
| download | olio-linux-3.10-e451e3daf417f5000f2ff102e5a61b2efd12e579.tar.xz olio-linux-3.10-e451e3daf417f5000f2ff102e5a61b2efd12e579.zip | |
IKXCLOCK-3231 tty: omap: cancel wakelocks from ti-st driver
Bug: 16555224
Change-Id: I015a38bb296957c265eaa4827564fb791280614c
Signed-off-by: Jim Wylder <jwylder@motorola.com>
| -rw-r--r-- | drivers/misc/ti-st/st_core.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/omap-serial.c | 26 | ||||
| -rw-r--r-- | include/linux/ti_wilink_st.h | 1 |
3 files changed, 26 insertions, 3 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c index d0bf4e9e46d..e8a8cb4e99c 100644 --- a/drivers/misc/ti-st/st_core.c +++ b/drivers/misc/ti-st/st_core.c @@ -807,6 +807,8 @@ static void st_tty_receive(struct tty_struct *tty, const unsigned char *data, st_recv(tty->disc_data, data, count); wake_lock_timeout(&st_wk_lock_timeout, msecs_to_jiffies(ST_WAKE_LOCK_TIMEOUT_MS)); + + omap_serial_relax(tty->index); pr_debug("done %s\n", __func__); } diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 037e46bd92a..625cf102cc3 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -226,6 +226,28 @@ void omap_serial_runtime_put(int port_index) spin_unlock(&up->port.lock); } +static void _omap_serial_wakeup_event(struct uart_omap_port *up) +{ + if (up->wakelock_timeout) + pm_wakeup_event(up->dev, up->wakelock_timeout); +} + +static void _omap_serial_relax(struct uart_omap_port *up) +{ + if (up->wakelock_timeout) + pm_relax(up->dev); +} + +void omap_serial_relax(int port_index) +{ + struct uart_omap_port *up; + + if (port_index >= OMAP_MAX_HSUART_PORTS) + return; + up = ui[port_index]; + _omap_serial_relax(up); +} + static inline unsigned int serial_in(struct uart_omap_port *up, int offset) { offset <<= up->port.regshift; @@ -546,9 +568,7 @@ static irqreturn_t serial_omap_irq(int irq, void *dev_id) spin_lock(&up->port.lock); pm_runtime_get_sync(up->dev); - - if (up->wakelock_timeout) - pm_wakeup_event(up->dev, up->wakelock_timeout); + _omap_serial_wakeup_event(up); do { iir = serial_in(up, UART_IIR); diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h index d914cd9085c..cf71cdea9f9 100644 --- a/include/linux/ti_wilink_st.h +++ b/include/linux/ti_wilink_st.h @@ -403,6 +403,7 @@ unsigned long st_ll_sleep_state(struct st_data_s *, unsigned char); void st_ll_wakeup(struct st_data_s *); void omap_serial_runtime_get(int port_index); void omap_serial_runtime_put(int port_index); +void omap_serial_relax(int port_index); /* * header information used by st_core.c for FM and GPS |