Re: [PATCH v1 31/31] serial: 8250_mxpcie: add RS485-2W auto-adjust sysfs control

From: Crescent Hsieh

Date: Tue Dec 02 2025 - 21:56:11 EST


On Mon, Dec 01, 2025 at 04:45:58AM +0200, Andy Shevchenko wrote:
> On Sun, Nov 30, 2025 at 12:46 PM Crescent Hsieh
> <crescentcy.hsieh@xxxxxxxx> wrote:
> >
> > Moxa CP118E/CP138E/CP134EL/CP116E boards support a hardware "auto mode"
> > in RS485-2W where the CPLD can automatically configure terminator and
> > pull-state based on the selected baud rate and line condition. This mode
> > is not meant to be kept enabled continuously — instead, it is triggered
> > for a short period (about 2s) to let the hardware calibrate itself.
> >
> > This patch adds a write-only sysfs attribute that requests a one-shot
> > hardware auto-adjust of terminator and pull-state. Writing a supported
> > baud rate value (one of 9600, 19200, 38400, 57600, 115200, 230400,
> > 460800, or 921600) into the attribute programs the CPLD baud code and
> > runs a temporary AUTO mode cycle (about 2s) on RS485-2W ports of the
> > supported boards. Invalid interfaces or devices are rejected.
>
> I'm not going to review this, the patch series is already quite big. I
> suggest you to start from the small things in a different series E.g.,
> the first series is just converting MOXA from custom to 8250-based
> (assuming all features are kept working while ABI is being broken,
> which has to be explained in the commit message(s) / cover letter of
> that series), the second one is about splitting 8250_pci to the other
> Moxa case. When this is done, we may go forward with the additional
> features.

Hi Andy,

Thanks a lot for spending so much time reviewing this large patch set.
I appreciate the detailed feedback.

I will split this big patch series into smaller and more focused series
to make it easier to review.

Thanks again for your guidance.

Sincerely,
Crescent Hsieh