summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCrescent Hsieh <crescentcy.hsieh@moxa.com>2026-07-31 15:48:16 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-08-03 16:51:57 +0200
commitaf1ba61b62be975902c5a4babcc7952f6dfdbd29 (patch)
tree1928c5d70730148a5b7739b1cbaf284327e02ccf /include
parentd21a1509c62386200c09ed102983b8d79a1b0485 (diff)
serial: 8250: allow low-level drivers to override break control
Some UARTs require driver-specific handling for break signaling, which cannot be expressed by the generic 8250 break implementation alone. Add an optional uart_port break_ctl callback and route serial8250_break_ctl() through it when provided. Rename the existing 8250 implementation to serial8250_do_break_ctl() and export it so low-level drivers can reuse the default 8250 behavior when appropriate. Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com> Link: https://patch.msgid.link/20260731074820.735619-11-crescentcy.hsieh@moxa.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/serial_8250.h1
-rw-r--r--include/linux/serial_core.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index eba36710bc47..eeb868e93e15 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -204,6 +204,7 @@ void serial8250_do_shutdown(struct uart_port *port);
void serial8250_do_pm(struct uart_port *port, unsigned int state,
unsigned int oldstate);
void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl);
+void serial8250_do_break_ctl(struct uart_port *port, int break_state);
void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
unsigned int quot);
int fsl8250_handle_irq(struct uart_port *port);
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index c4cc4f66af4b..a7fd24f9e908 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -464,6 +464,7 @@ struct uart_port {
void (*shutdown)(struct uart_port *port);
void (*throttle)(struct uart_port *port);
void (*unthrottle)(struct uart_port *port);
+ void (*break_ctl)(struct uart_port *port, int break_state);
int (*handle_irq)(struct uart_port *);
void (*pm)(struct uart_port *, unsigned int state,
unsigned int old);