Re: [PATCH v1 29/31] serial: 8250_mxpcie: Add sysfs to control terminator
From: Crescent Hsieh
Date: Tue Dec 02 2025 - 21:55:11 EST
On Mon, Dec 01, 2025 at 04:40:51AM +0200, Andy Shevchenko wrote:
> On Sun, Nov 30, 2025 at 12:46 PM Crescent Hsieh
> <crescentcy.hsieh@xxxxxxxx> wrote:
> >
> > Some Moxa PCIe serial board variants support software-controlled
> > termination resistors on each port. Users currently have no standardized
> > interface to enable or disable terminator state from userspace.
> >
> > This patch introduces the following:
> >
> > - EXPORT a new sysfs attribute `/sys/class/tty/*/mxpcie8250_terminator`
> > to allow users to read or set the terminator state (enabled/disabled).
> > - Implement both CPLD-based and GPIO-based paths depending on board model.
> > - Track runtime terminator state in `struct mxpcie8250_port`.
> > - Serialize CPLD modifications using a new `board_lock` spinlock.
> >
> > Example usage:
> >
> > # Enable terminator on ttyS*
> > echo 1 > /sys/class/tty/ttyS*/mxpcie8250_terminator
> >
> > # Check current state
> > cat /sys/class/tty/ttyS*/mxpcie8250_terminator
> > enabled
>
> This introduces an ABI without documentation update. It's no go.
Just to confirm my understanding — for any new user-visible ABI such
as a sysfs attribute, the corresponding documentation under
Documentation/ABI/ must be included in the same patch/series?
---
Sincerely,
Crescent Hsieh