mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Lukas Wunner <lukas@wunner.de>,
	Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: linux-kernel@vger.kernel.org,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH 0/2] serial: RS485 termination improvements
Date: Mon,  4 Jul 2022 12:45:13 +0300	[thread overview]
Message-ID: <20220704094515.6831-1-ilpo.jarvinen@linux.intel.com> (raw)

This series improves termination handling for RS485. Effectively,
.rs485_supported is made a per port and the termination flag is enabled
when DT configures termination. The downside of this is that embedded
struct consumes a little bit of more memory, especially as struct
serial_rs485 has the padding field.

There is other problem on this area besides the one addressed by this
series which is new since the introduction of .rs485_supported. Lino's
patch series addresses the ability to tweak the termination through
->rs485_config() for any driver.

For kernel uses, struct kserial_rs485 version of serial_rs485 could be
added and both .rs485 and .rs485_supported converted to it leaving
struct_rs485 only for UAPI use. This series, howver, doesn't attempt
it. It seems relatively easy to build it on top of these changes
though.


Ilpo Järvinen (2):
  serial: Embed rs485_supported
  serial: RS485 termination is supported if DT provides one

 drivers/tty/serial/8250/8250_bcm2835aux.c |  2 +-
 drivers/tty/serial/8250/8250_dwlib.c      |  4 ++--
 drivers/tty/serial/8250/8250_exar.c       |  2 +-
 drivers/tty/serial/8250/8250_fintek.c     |  4 ++--
 drivers/tty/serial/8250/8250_lpc18xx.c    |  2 +-
 drivers/tty/serial/8250/8250_of.c         |  2 +-
 drivers/tty/serial/8250/8250_pci.c        |  2 +-
 drivers/tty/serial/amba-pl011.c           |  2 +-
 drivers/tty/serial/ar933x_uart.c          |  4 ++--
 drivers/tty/serial/atmel_serial.c         |  2 +-
 drivers/tty/serial/fsl_lpuart.c           |  2 +-
 drivers/tty/serial/imx.c                  |  4 ++--
 drivers/tty/serial/max310x.c              |  2 +-
 drivers/tty/serial/mcf.c                  |  4 ++--
 drivers/tty/serial/omap-serial.c          |  2 +-
 drivers/tty/serial/sc16is7xx.c            |  2 +-
 drivers/tty/serial/serial_core.c          | 10 ++++++----
 drivers/tty/serial/stm32-usart.c          |  2 +-
 include/linux/serial_core.h               |  2 +-
 19 files changed, 29 insertions(+), 27 deletions(-)

-- 
2.30.2


             reply	other threads:[~2022-07-04  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04  9:45 Ilpo Järvinen [this message]
2022-07-04  9:45 ` [PATCH 1/2] serial: Embed rs485_supported to uart_port Ilpo Järvinen
2022-07-05 10:41   ` Lino Sanfilippo
2022-07-04  9:45 ` [PATCH 2/2] serial: RS485 termination is supported if DT provides one Ilpo Järvinen
2022-07-05 10:27   ` Lino Sanfilippo

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=20220704094515.6831-1-ilpo.jarvinen@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=LinoSanfilippo@gmx.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lukas@wunner.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

all inboxes | Powered by JetHome®