diff options
| author | Crescent Hsieh <crescentcy.hsieh@moxa.com> | 2026-07-31 15:48:18 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-08-03 16:51:57 +0200 |
| commit | 8a6c543cf8b3630a3db714e1be99931ab5f98513 (patch) | |
| tree | 920f170c16cc2944d12ea59af16b9d47e68b980a /include/linux | |
| parent | ade78d3d253c4b481b280c08ba9c1701733c7412 (diff) | |
serial: 8250: allow UART drivers to override rx_trig_bytes handling
The rx_trig_bytes sysfs attribute currently relies on 8250-internal
helper functions and assumes a fixed mapping between trigger levels and
FIFO behavior.
Some UARTs provide hardware-specific RX trigger mechanisms that do not
fit this model. Add optional uart_port callbacks for setting and getting
the RX trigger level, and use them when provided, while preserving the
existing 8250 helpers as the default fallback.
Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com>
Link: https://patch.msgid.link/20260731074820.735619-13-crescentcy.hsieh@moxa.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/serial_core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index a7fd24f9e908..904760876ca8 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -460,6 +460,8 @@ struct uart_port { unsigned int baud, unsigned int quot, unsigned int quot_frac); + int (*get_rxtrig)(struct uart_port *port); + int (*set_rxtrig)(struct uart_port *port, unsigned char bytes); int (*startup)(struct uart_port *port); void (*shutdown)(struct uart_port *port); void (*throttle)(struct uart_port *port); |
