public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Hugo Villeneuve <hugo@hugovil.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Jiri Slaby <jirislaby@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 linux-serial <linux-serial@vger.kernel.org>,
	 Hugo Villeneuve <hvilleneuve@dimonoff.com>
Subject: Re: [PATCH 0/9] serial: add new I/O type for SPI and I2C bus devices
Date: Fri, 24 Apr 2026 14:24:57 +0300 (EEST)	[thread overview]
Message-ID: <43a17428-e5a4-41ad-a904-cd9ec6ad2962@linux.intel.com> (raw)
In-Reply-To: <20260423-tty-upio-v1-0-baf82d3b86d1@dimonoff.com>

[-- Attachment #1: Type: text/plain, Size: 3428 bytes --]

On Thu, 23 Apr 2026, Hugo Villeneuve wrote:

> Hello,
> this patch series add a new I/O type for serial devices on a SPI/I2C bus.
> 
> These changes are based on a suggestion [1] made by Ilpo Järvinen during
> past sc16is7xx driver patches review.

Hehe, I didn't even recall suggesting this (nor why) :-).

I like this series. Some, relatively minor, comments on the individual 
patches. Thanks for looking into solving this properly.

-- 
 i.

> I decided to use UPIO_BUS/SERIAL_IO_BUS names but maybe other names would
> be more appropriate:
>    UPIO_SBUS   / SERIAL_IO_SBUS
>    UPIO_SERBUS / SERIAL_IO_SERBUS
>    UPIO_EXT    / SERIAL_IO_EXT
>    UPIO_CUSTOM / SERIAL_IO_CUSTOM
>    UPIO_REGMAP / SERIAL_IO_REGMAP  /* Maybe not always true in future? */
>    ...
> 
> Tested on a imx6 board with two SC16is752 using SPI mode, and a dummy
> device-tree entry for a MAX3100:
>   dmesg -t | grep "base_baud"
>     2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 197, base_baud = 5000000) is a IMX
>     21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 198, base_baud = 5000000) is a IMX
>     spi1.0: ttySC0 (irq = 165, base_baud = 1500000) is a SC16IS752
>     spi1.0: ttySC1 (irq = 165, base_baud = 1500000) is a SC16IS752
>     spi3.0: ttySC2 (irq = 37, base_baud = 1500000) is a SC16IS752
>     spi3.0: ttySC3 (irq = 37, base_baud = 1500000) is a SC16IS752
>     spi3.1: ttyMAX0 (irq = 0, base_baud = 0) is a MAX3100
> Note that before these patches, max3100 silently failed in uart_configure_port()
> because membase/iobase/mapbase were zero.
>
> For max310x and SC16is7xx in i2c mode, tested only that driver is properly
> registered by using i2c-stub.
> 
> Also tested on a custom board with a Renesas RZ/G2L cpu (sh-sci driver) to
> confirm there is no regression:
>   dmesg -t | grep "base_baud"
>     1004b800.serial: ttySC0 at MMIO 0x1004b800 (irq = 35, base_baud = 0) is a scif
>     1004bc00.serial: ttySC1 at MMIO 0x1004bc00 (irq = 40, base_baud = 0) is a scif
> 
> Maybe some of the patches could be merged together, but for now I decided
> to keep them separate to help the review process.
> 
> Thank you.
> 
> [1] https://lore.kernel.org/lkml/2936e18f-44ea-faed-9fa0-2ddefe7c3194@linux.intel.com/raw
> 
> ---
> Hugo Villeneuve (9):
>       serial: core: add uart_iotype_mmio/legacy_io helper functions
>       serial: core: use uart_iotype_*() to simplify code
>       serial: 8250: use uart_iotype_*() to simplify code
>       serial: core: fix indentation/alignment
>       serial: core: add new I/O type for SPI and I2C bus devices
>       serial: core: prevent irrelevant I/O infos display for UPIO_BUS
>       serial: sc16is7xx: use new UPIO_BUS as iotype
>       serial: max310x: use new UPIO_BUS as iotype
>       serial: max3100: use new UPIO_BUS as iotype
> 
>  drivers/tty/serial/8250/8250_port.c |  33 ++--------
>  drivers/tty/serial/max3100.c        |   1 +
>  drivers/tty/serial/max310x.c        |   9 +--
>  drivers/tty/serial/sc16is7xx.c      |   9 +--
>  drivers/tty/serial/serial_core.c    | 121 ++++++++++++++++++++----------------
>  include/linux/serial_core.h         |   5 ++
>  include/uapi/linux/serial.h         |   1 +
>  7 files changed, 83 insertions(+), 96 deletions(-)
> ---
> base-commit: 2e68039281932e6dc37718a1ea7cbb8e2cda42e6
> change-id: 20260423-tty-upio-c8b66a0a593e
> 
> Best regards,
> 

      parent reply	other threads:[~2026-04-24 11:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23 20:15 [PATCH 0/9] serial: add new I/O type for SPI and I2C bus devices Hugo Villeneuve
2026-04-23 20:15 ` [PATCH 1/9] serial: core: add uart_iotype_mmio/legacy_io helper functions Hugo Villeneuve
2026-04-23 20:15 ` [PATCH 2/9] serial: core: use uart_iotype_*() to simplify code Hugo Villeneuve
2026-04-24 11:13   ` Ilpo Järvinen
2026-04-24 15:30     ` Hugo Villeneuve
2026-04-23 20:15 ` [PATCH 3/9] serial: 8250: " Hugo Villeneuve
2026-04-23 20:15 ` [PATCH 4/9] serial: core: fix indentation/alignment Hugo Villeneuve
2026-04-23 20:15 ` [PATCH 5/9] serial: core: add new I/O type for SPI and I2C bus devices Hugo Villeneuve
2026-04-23 20:15 ` [PATCH 6/9] serial: core: prevent irrelevant I/O infos display for UPIO_BUS Hugo Villeneuve
2026-04-24 10:51   ` Ilpo Järvinen
2026-04-24 14:24     ` Hugo Villeneuve
2026-04-23 20:15 ` [PATCH 7/9] serial: sc16is7xx: use new UPIO_BUS as iotype Hugo Villeneuve
2026-04-23 20:15 ` [PATCH 8/9] serial: max310x: " Hugo Villeneuve
2026-04-23 20:15 ` [PATCH 9/9] serial: max3100: " Hugo Villeneuve
2026-04-24 11:24 ` Ilpo Järvinen [this message]

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=43a17428-e5a4-41ad-a904-cd9ec6ad2962@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hugo@hugovil.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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