From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: linux-serial@vger.kernel.org,
Greg KH <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Lukas Wunner" <lukas@wunner.de>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Lino Sanfilippo" <LinoSanfilippo@gmx.de>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Arnd Bergmann" <arnd@arndb.de>,
linux-api@vger.kernel.org, linux-arch@vger.kernel.org
Subject: [PATCH v8 0/6] Add RS485 9th bit addressing mode support to DW UART
Date: Mon, 20 Jun 2022 09:40:24 +0300 [thread overview]
Message-ID: <20220620064030.7938-1-ilpo.jarvinen@linux.intel.com> (raw)
This patchset adds RS-485 9th bit addressing mode support to the DW
UART driver and the necessary serial core bits to handle it. The
addressing mode is configured through ->rs485_config() as was requested
during the review of the earlier versions. The line configuration
related ADDRB is still kept in ktermios->c_cflag to be able to take
account the extra addressing bit while calculating timing, etc. but it
is set/cleared by ->rs485_config().
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-api@vger.kernel.org
Cc: linux-arch@vger.kernel.org
v7 -> v8:
- Use anonymous union/struct in serial_rs485 to create "v2" of it
- Remove a stray newline change
- Reorder local var declarations
- Put ktermios param before serial_rs485 for rs485_config
v6 -> v7:
- Fixed typos in documentation & comment
- Changes lsr typing from unsigned int to u16
v5 -> v6:
- Reorder remaining patches
- LSR changes are simpler due to helper added by LSR fix series
- Depend on rs485_struct sanitization on catching much of invalid config
- In order to be able to alter ADDRB in termios .c_cflag within
.rs485_config(), take termios_rwsem and pass ktermios to it.
- Moved addressing mode setup entirely into .rs485_config()
- Use ndelay() instead of udelay() (uart_port->frame_time is in nsecs)
Ilpo Järvinen (6):
serial: 8250: make saved LSR larger
serial: 8250: create lsr_save_mask
serial: 8250_lpss: Use 32-bit reads
serial: take termios_rwsem for ->rs485_config() & pass termios as
param
serial: Support for RS-485 multipoint addresses
serial: 8250_dwlib: Support for 9th bit multipoint addressing
Documentation/driver-api/serial/driver.rst | 2 +
.../driver-api/serial/serial-rs485.rst | 26 ++++-
drivers/tty/serial/8250/8250.h | 9 +-
drivers/tty/serial/8250/8250_core.c | 4 +
drivers/tty/serial/8250/8250_dw.c | 2 +-
drivers/tty/serial/8250/8250_dwlib.c | 105 +++++++++++++++++-
drivers/tty/serial/8250/8250_exar.c | 11 +-
drivers/tty/serial/8250/8250_fintek.c | 2 +-
drivers/tty/serial/8250/8250_fsl.c | 2 +-
drivers/tty/serial/8250/8250_ingenic.c | 2 +-
drivers/tty/serial/8250/8250_lpc18xx.c | 2 +-
drivers/tty/serial/8250/8250_lpss.c | 2 +-
drivers/tty/serial/8250/8250_omap.c | 7 +-
drivers/tty/serial/8250/8250_pci.c | 2 +-
drivers/tty/serial/8250/8250_port.c | 20 ++--
drivers/tty/serial/amba-pl011.c | 2 +-
drivers/tty/serial/ar933x_uart.c | 2 +-
drivers/tty/serial/atmel_serial.c | 2 +-
drivers/tty/serial/fsl_lpuart.c | 4 +-
drivers/tty/serial/imx.c | 2 +-
drivers/tty/serial/max310x.c | 2 +-
drivers/tty/serial/mcf.c | 3 +-
drivers/tty/serial/omap-serial.c | 3 +-
drivers/tty/serial/sc16is7xx.c | 2 +-
drivers/tty/serial/serial_core.c | 28 ++++-
drivers/tty/serial/stm32-usart.c | 2 +-
drivers/tty/tty_ioctl.c | 4 +
include/linux/serial_8250.h | 7 +-
include/linux/serial_core.h | 1 +
include/uapi/asm-generic/termbits-common.h | 1 +
include/uapi/linux/serial.h | 20 +++-
31 files changed, 230 insertions(+), 53 deletions(-)
--
2.30.2
next reply other threads:[~2022-06-20 6:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 6:40 Ilpo Järvinen [this message]
2022-06-20 6:40 ` [PATCH v8 5/6] serial: Support for RS-485 multipoint addresses Ilpo Järvinen
2022-06-20 10:58 ` Andy Shevchenko
2022-06-20 11:26 ` Ilpo Järvinen
2022-06-20 11:48 ` Andy Shevchenko
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=20220620064030.7938-1-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=LinoSanfilippo@gmx.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=u.kleine-koenig@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).