diff options
author | San Mehat <san@google.com> | 2009-07-29 20:21:28 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-09-29 17:49:23 -0700 |
commit | 4fa4b98ed94cbe928aab87ef74170cd590d7fcf0 (patch) | |
tree | d6fd10e5e53b0a52f8db3a09f1ea7d950cee179d | |
parent | a9c6ed5b17da022bf74e4e49c6d6f2d56af6fa51 (diff) |
serial_core: Add wake_peer uart operation which is called before starting UART TX. The idea here is to provide a mechanism where we can wakeup our peer before sending data.
Signed-off-by: San Mehat <san@google.com>
-rw-r--r-- | drivers/serial/serial_core.c | 3 | ||||
-rw-r--r-- | include/linux/serial_core.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index cd8511298bcb..076cfd1546d4 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -94,6 +94,9 @@ static void __uart_start(struct tty_struct *tty) struct uart_state *state = tty->driver_data; struct uart_port *port = state->uart_port; + if (port->ops->wake_peer) + port->ops->wake_peer(port); + if (!uart_circ_empty(&state->xmit) && state->xmit.buf && !tty->stopped && !tty->hw_stopped) port->ops->start_tx(port); diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 563e23400913..7b8a09e2ec7f 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -234,6 +234,7 @@ struct uart_ops { void (*pm)(struct uart_port *, unsigned int state, unsigned int oldstate); int (*set_wake)(struct uart_port *, unsigned int state); + void (*wake_peer)(struct uart_port *); /* * Return a string describing the type of the port |