All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tapio Reijonen" <tapio.reijonen@vaisala.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v7 8/9] serial: max310x: drive RTS in software when hardware delays are too short
Date: Mon, 05 Oct 2026 13:40:02 +0000	[thread overview]
Message-ID: <20261005134002.B5EB41F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005-max310x-rs485-sw-delay-v7-8-6ae392eca08c@vaisala.com>

> The chip's auto-RTS path can express at most 15 bit-times of RTS setup
> and hold delay - a fraction of a millisecond at typical baud rates -
> while the uapi expresses the delays in milliseconds up to the UART
> core's RS485_MAX_RTS_DELAY. Requests beyond the field were rejected
> with -ERANGE, which makes the core silently wipe port->rs485 and
> disable RS485; a device tree asking for a 20 ms setup delay ends up
> with no RS485 at all and an unusable bus.
> 
> Add a software-driven RTS path that takes over whenever the hardware
> cannot represent the requested timing, and clamp the delays to
> RS485_MAX_RTS_DELAY instead of rejecting them.
> 
> max310x_set_rts_ctl_params() picks the path: software if either delay
> exceeds what 15 bit-times encode at the current baud rate, or if the
> requested RTS polarity combination cannot be produced by the auto-RTS
> [ ... ]
> there.
> 
> Fixes: 55367c620aed ("serial: max310x: Add support for RS-485 mode")
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Tapio Reijonen <tapio.reijonen@vaisala.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261005-max310x-rs485-sw-delay-v7-0-6ae392eca08c@vaisala.com?part=8


  reply	other threads:[~2026-10-05 13:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 13:19 [PATCH v7 0/9] (no cover subject) Tapio Reijonen
2026-10-05 13:19 ` [PATCH v7 1/9] serial: max310x: don't clobber the TX break bit in set_termios Tapio Reijonen
2026-10-05 13:27   ` sashiko-bot
2026-10-05 15:57   ` Hugo Villeneuve
2026-10-06  4:06     ` Tapio Reijonen
2026-10-06 13:42       ` Hugo Villeneuve
2026-10-08  9:06         ` Tapio Reijonen
2026-10-05 13:19 ` [PATCH v7 2/9] serial: max310x: assert the transceiver during a break Tapio Reijonen
2026-10-05 13:39   ` sashiko-bot
2026-10-05 13:19 ` [PATCH v7 3/9] serial: max310x: centralize the RS485 transceiver programming Tapio Reijonen
2026-10-05 13:19 ` [PATCH v7 4/9] serial: max310x: convert RS485 delays from milliseconds to bit-times Tapio Reijonen
2026-10-05 13:33   ` sashiko-bot
2026-10-05 13:19 ` [PATCH v7 5/9] serial: max310x: stop the transmitter before powering down in shutdown Tapio Reijonen
2026-10-05 13:34   ` sashiko-bot
2026-10-05 13:19 ` [PATCH v7 6/9] serial: max310x: support active-low RTS on the hardware path Tapio Reijonen
2026-10-05 13:34   ` sashiko-bot
2026-10-05 13:19 ` [PATCH v7 7/9] serial: max310x: schedule tx_work directly from the IRQ handler Tapio Reijonen
2026-10-05 13:30   ` sashiko-bot
2026-10-05 13:19 ` [PATCH v7 8/9] serial: max310x: drive RTS in software when hardware delays are too short Tapio Reijonen
2026-10-05 13:40   ` sashiko-bot [this message]
2026-10-05 13:19 ` [PATCH v7 9/9] serial: max310x: don't transmit while an RS485 reconfigure is pending Tapio Reijonen
2026-10-05 13:41   ` sashiko-bot
2026-10-05 13:37 ` [PATCH v7 0/9] (no cover subject) Tapio Reijonen
2026-10-05 15:51 ` Hugo Villeneuve
2026-10-06  4:03   ` Tapio Reijonen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261005134002.B5EB41F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tapio.reijonen@vaisala.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.