diff options
| author | San Mehat <san@google.com> | 2009-07-29 20:21:28 -0700 | 
|---|---|---|
| committer | Arve Hjønnevåg <arve@android.com> | 2013-07-01 13:40:27 -0700 | 
| commit | e88c8c397968c05df7442580625c9fe3f47a952c (patch) | |
| tree | cd4d6ace2e5a56efd80ec23d56d5b697d53d4296 | |
| parent | 40a20d1ae05643eb4ed8f8f949a6517728a201d5 (diff) | |
| download | olio-linux-3.10-e88c8c397968c05df7442580625c9fe3f47a952c.tar.xz olio-linux-3.10-e88c8c397968c05df7442580625c9fe3f47a952c.zip | |
serial_core: Add wake_peer uart operation
Add wake_peer which is called before starting UART TX. The idea here
is to provide a mechanism where we can wakeup our peer before sending
data.
Change-Id: I42e0779b635f64ca99184b45d5b028de80197491
Signed-off-by: San Mehat <san@google.com>
| -rw-r--r-- | drivers/tty/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/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index f87dbfd3277..7855f3a4ad0 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -95,6 +95,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 87d4bbc773f..a782f3ca71e 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -60,6 +60,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 |