summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>2022-06-07 21:52:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-10 14:30:41 +0300
commitcfab87c2c2715763dc7e43d9968bdaa01cde4bc3 (patch)
treeba9de1fdf2ace007227aad12aeec2c9003a94f8a /include
parente74024b2eccbb784824a0f9feaeaaa3b47514b79 (diff)
downloadlinux-cfab87c2c2715763dc7e43d9968bdaa01cde4bc3.tar.xz
serial: core: Introduce callback for start_rx and do stop_rx in suspend only if this callback implementation is present.
In suspend sequence there is a need to perform stop_rx during suspend sequence to prevent any asynchronous data over rx line. However this can cause problem to drivers which dont do re-start_rx during set_termios. Add new callback start_rx and perform stop_rx only when implementation of start_rx is present. Also add call to start_rx in resume sequence so that drivers who come across this problem can make use of this framework. Fixes: c9d2325cdb92 ("serial: core: Do stop_rx in suspend path for console if console_suspend is disabled") Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> Link: https://lore.kernel.org/r/1654627965-1461-2-git-send-email-quic_vnivarth@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/serial_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index cbd5070bc87f..657a0fc68a3f 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -45,6 +45,7 @@ struct uart_ops {
void (*unthrottle)(struct uart_port *);
void (*send_xchar)(struct uart_port *, char ch);
void (*stop_rx)(struct uart_port *);
+ void (*start_rx)(struct uart_port *);
void (*enable_ms)(struct uart_port *);
void (*break_ctl)(struct uart_port *, int ctl);
int (*startup)(struct uart_port *);