Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0772b6e5 authored by San Mehat's avatar San Mehat Committed by Ruchi Kandoi
Browse files

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: default avatarSan Mehat <san@google.com>
parent 1fb6edeb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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_tx_stopped(port))
		port->ops->start_tx(port);
}
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ struct uart_ops {
	void		(*set_ldisc)(struct uart_port *, int new);
	void		(*pm)(struct uart_port *, unsigned int state,
			      unsigned int oldstate);
	void		(*wake_peer)(struct uart_port *);

	/*
	 * Return a string describing the type of the port