mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/6] serial: vt8500: Clean up the probe using devm and new serial core helpers
@ 2026-11-12 15:33 Alexey Charkov
  2026-11-12 15:33 ` [PATCH v2 1/6] serial: core: Add uart_console_port() Alexey Charkov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Alexey Charkov @ 2026-11-12 15:33 UTC (permalink / raw)
  To: Alexey Charkov, Krzysztof Kozlowski, Greg Kroah-Hartman,
	Jiri Slaby, Tony Prisk, Alan Cox
  Cc: linux-arm-kernel, linux-kernel, linux-serial, Greg Kroah-Hartman,
	Wentao Liang, Sashiko

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>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-12 15:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 15:33 [PATCH v2 0/6] serial: vt8500: Clean up the probe using devm and new serial core helpers Alexey Charkov
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

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®