[PATCH 00/10] serial: max310x: improvements and cleanups

From: Hugo Villeneuve

Date: Fri Apr 17 2026 - 11:41:05 EST


Hello,
this patch series brings a few improvements and cleanups to the max310x
driver.

Note that I do not have access to a board with an actual max310x IC on it,
but I have tested it by using i2c-stub to simulate the four ports on a
virtual max14830 device.

Tests for patch "serial: max310x: use regmap_read_poll_timeout() for busy
wait":
Tested by setting the initial register values to 0x00, then loading the
driver with a (temporary) modified delay of 10s and using i2c-stub
to set register values to 0x01 after 5 seconds. Also tested by leaving
register to 0x00 and confirming the timout is properly handled.

Tests for reference clock computations:
Tested all possible frequencies from 5KHz to 35MHz in 1z increment
(osc mode) and comparing the resulting reference clock between the original
code and the new one, again using i2c-stub.

Thank you.

---
Hugo Villeneuve (10):
serial: max310x: uniformize clock/freq types
serial: max310x: simplify max310x_update_best_err()
serial: max310x: change return type of max310x_set_ref_clk()
serial: max310x: update baudrate comments for err calculation
serial: max310x: improve max310x_set_ref_clk() efficiency
serial: max310x: use regmap_read_poll_timeout() for busy wait
serial: max310x: use FIELD_PREP macro to set PLL bitfields
serial: max310x: allow driver to be built with SPI or I2C
serial: max310x: move variables to while() scope
serial: max310x: add comments for PLL limits

drivers/tty/serial/Kconfig | 2 +-
drivers/tty/serial/max310x.c | 179 ++++++++++++++++++++++++-------------------
2 files changed, 103 insertions(+), 78 deletions(-)
---
base-commit: a1a81aef99e853dec84241d701fbf587d713eb5b
change-id: 20260417-max310x-2-965fe921aea6

Best regards,
--
Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>