Re: [PATCH v1 22/31] serial: 8250_mxupci: implement rx_trig_bytes callbacks and persist per-port level
From: Andy Shevchenko
Date: Sun Nov 30 2025 - 21:04:27 EST
On Sun, Nov 30, 2025 at 12:45 PM Crescent Hsieh
<crescentcy.hsieh@xxxxxxxx> wrote:
>
> Implement device-specific RX trigger handling for the rx_trig_bytes sysfs
> attribute on MXUPCI parts by programming the vendor registers directly.
>
> Changes:
> - Introduce a per-port structure to persist the registered line and the
> RX trigger level, so the level can be restored on startup.
> - Implement uart_port callbacks:
> - set_rxtrig(port, bytes): program MOXA_UART_RBRTI and cache the level
> - get_rxtrig(port): return the cached RX trigger level
> - Use the cached RX trigger level during startup instead of a fixed
> default, while keeping the initial default at 96 for backward
> compatibility.
>
> With these callbacks, writes to rx_trig_bytes update the hardware-specific
> register and the selected threshold is preserved across open/close cycles.
>
> No functional change for other 8250 drivers.
Same comments applied here as per previous patch.
--
With Best Regards,
Andy Shevchenko