From: Alexey Charkov <alchark@gmail.com>
To: Alexey Charkov <alchark@gmail.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Tony Prisk <linux@prisktech.co.nz>,
Alan Cox <alan@linux.intel.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Greg Kroah-Hartman <gregkh@suse.de>,
Wentao Liang <vulab@iscas.ac.cn>,
Sashiko <sashiko-bot@kernel.org>
Subject: [PATCH v2 0/6] serial: vt8500: Clean up the probe using devm and new serial core helpers
Date: Thu, 12 Nov 2026 19:33:08 +0400 [thread overview]
Message-ID: <20261112-vt8500-serial-cleanup-v2-0-36b258e0c0dd@gmail.com> (raw)
The driver has been carrying legacy vestiges in the form of a bitmask and
a local array to track which ports should be numbered which, both of them
not really needed anymore with DT aliases and existing in-core tracking.
Remove them altogether to simplify the driver and get rid of leaks Sashiko
found. While here, also convert the clock handling to use the resource
managed API, and propagate errors from uart_add_one_port().
This hinges upon two new reusable helpers in the serial core which allow
getting the console port for a given line number per driver, and another
one to auto-assign line numbers for which drivers currently keep an
assortment of local accounting boilerplate (some with locking and leaking
issues, such as vt8500 to date).
Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
Changes in v2:
- Added a core helper to get the console port for a given line number per driver
- Added UART_LINE_AUTO support for automatic line number assignment when no OF
alias is provided
- Link to v1: https://patch.msgid.link/20261111-vt8500-serial-cleanup-v1-0-b33594a25f87@gmail.com
---
Alexey Charkov (6):
serial: core: Add uart_console_port()
serial: core: Allocate a free line for UART_LINE_AUTO ports
serial: vt8500: Look up console ports with uart_console_port()
serial: vt8500: Drop the port index bitmap
serial: vt8500: Use devm_clk_get_enabled()
serial: vt8500: Handle uart_add_one_port() failure
drivers/tty/serial/serial_core.c | 89 +++++++++++++++++++++++++++++++++++++-
drivers/tty/serial/vt8500_serial.c | 89 +++++++++-----------------------------
include/linux/serial_core.h | 5 +++
3 files changed, 112 insertions(+), 71 deletions(-)
---
base-commit: aaa2f954c21b205a0bcd0961e5b2be4e82e58455
change-id: 20261111-vt8500-serial-cleanup-dfc9731edd70
Best regards,
--
Alexey Charkov <alchark@gmail.com>
next reply other threads:[~2026-11-12 15:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 15:33 Alexey Charkov [this message]
2026-11-12 15:33 ` [PATCH v2 1/6] serial: core: Add uart_console_port() Alexey Charkov
2026-11-12 15:33 ` [PATCH v2 2/6] serial: core: Allocate a free line for UART_LINE_AUTO ports Alexey Charkov
2026-11-12 15:33 ` [PATCH v2 3/6] serial: vt8500: Look up console ports with uart_console_port() Alexey Charkov
2026-11-12 15:33 ` [PATCH v2 4/6] serial: vt8500: Drop the port index bitmap Alexey Charkov
2026-11-12 15:33 ` [PATCH v2 5/6] serial: vt8500: Use devm_clk_get_enabled() Alexey Charkov
2026-11-12 15:33 ` [PATCH v2 6/6] serial: vt8500: Handle uart_add_one_port() failure Alexey Charkov
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=20261112-vt8500-serial-cleanup-v2-0-36b258e0c0dd@gmail.com \
--to=alchark@gmail.com \
--cc=alan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=gregkh@suse.de \
--cc=jirislaby@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@prisktech.co.nz \
--cc=sashiko-bot@kernel.org \
--cc=vulab@iscas.ac.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®