mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] serial: RS485 termination improvements
@ 2022-07-04  9:45 Ilpo Järvinen
  2022-07-04  9:45 ` [PATCH 1/2] serial: Embed rs485_supported to uart_port Ilpo Järvinen
  2022-07-04  9:45 ` [PATCH 2/2] serial: RS485 termination is supported if DT provides one Ilpo Järvinen
  0 siblings, 2 replies; 5+ messages in thread
From: Ilpo Järvinen @ 2022-07-04  9:45 UTC (permalink / raw)
  To: linux-serial, Greg KH, Jiri Slaby, Andy Shevchenko, Lukas Wunner,
	Lino Sanfilippo
  Cc: linux-kernel, Ilpo Järvinen

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


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

end of thread, other threads:[~2022-07-05 10:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04  9:45 [PATCH 0/2] serial: RS485 termination improvements Ilpo Järvinen
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

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®