linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/7] serial: 8250: Add rs485 emulation to 8250_dw
@ 2020-03-25 23:14 Heiko Stuebner
  2020-03-25 23:14 ` [PATCH DON'T APPLY v2 1/7] serial: Allow uart_get_rs485_mode() to return errno Heiko Stuebner
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Heiko Stuebner @ 2020-03-25 23:14 UTC (permalink / raw)
  To: gregkh
  Cc: jslaby, andriy.shevchenko, matwey.kornilov, linux-serial,
	linux-kernel, heiko, lukas, christoph.muellner, giulio.benetti

This series tries to revive the work of Giulio Benetti from 2018 [0]
which seemed to have stalled at that time.

The board I needed that on also had the additional caveat that it
uses non-standard pins for DE/RE so needed gpio mctrl layer as well
and even more special needed to control the RE pin manually not as
part of it being connected to the DE signal as seems to be the standard.

The first 3 patches are taken from Lukas Wunner's repository
with work he wants to submit after 5.7-rc1.
Patches needed adaptions from their 4.19 base of course,
so no guarantes I did that correctly ;-) .
I just need the change in the rs485_mode handling as base.

So as suggested by Andy this series is meant as a base for discussions
to show how my 8250_dw rs485 support fits onto the more recent codebase
and find more issues earlier.


Changes in v2:
- move to recent rs485 improvements in tty-next
- added a capability for TEMT interrupt presence
- external gpio for optional receiver-enable handling
- timeout polling via the generic readx_poll_timeout

Changes from the 2018 submission include:
- add timeout when waiting for fifos to clear using a new helper
- move on-boot enablement of the rs485 mode to after registering
  the port. This saves having to copy the em485 struct as done
  originally, which also ran into spinlock-debug warnings when testing
  and also makes it actually possible to use the mctrl gpio layer
  for non-standard gpios.


*** BLURB HERE ***

Giulio Benetti (2):
  serial: 8250: Handle implementations not having TEMT interrupt using
    em485
  serial: 8250_dw: add em485 support

Heiko Stuebner (2):
  dt-bindings: serial: Add binding for rs485 receiver enable GPIO
  serial: 8250: Support separate rs485 rx-enable GPIO

Lukas Wunner (3):
  serial: Allow uart_get_rs485_mode() to return errno
  dt-bindings: serial: Add binding for rs485 bus termination GPIO
  serial: 8250: Support rs485 bus termination GPIO

 .../devicetree/bindings/serial/rs485.yaml     |  8 ++++
 drivers/tty/serial/8250/8250.h                |  1 +
 drivers/tty/serial/8250/8250_bcm2835aux.c     |  2 +-
 drivers/tty/serial/8250/8250_core.c           |  4 +-
 drivers/tty/serial/8250/8250_dw.c             |  3 ++
 drivers/tty/serial/8250/8250_of.c             |  2 +
 drivers/tty/serial/8250/8250_omap.c           |  2 +-
 drivers/tty/serial/8250/8250_port.c           | 41 +++++++++++++++---
 drivers/tty/serial/ar933x_uart.c              |  6 ++-
 drivers/tty/serial/atmel_serial.c             |  6 ++-
 drivers/tty/serial/fsl_lpuart.c               |  5 ++-
 drivers/tty/serial/imx.c                      |  6 ++-
 drivers/tty/serial/omap-serial.c              |  4 +-
 drivers/tty/serial/serial_core.c              | 43 ++++++++++++++++++-
 drivers/tty/serial/stm32-usart.c              |  8 ++--
 include/linux/serial_core.h                   |  4 +-
 16 files changed, 124 insertions(+), 21 deletions(-)

-- 
2.24.1


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

end of thread, other threads:[~2020-05-17 22:01 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 23:14 [PATCH RFC v2 0/7] serial: 8250: Add rs485 emulation to 8250_dw Heiko Stuebner
2020-03-25 23:14 ` [PATCH DON'T APPLY v2 1/7] serial: Allow uart_get_rs485_mode() to return errno Heiko Stuebner
2020-03-25 23:14 ` [PATCH DON'T APPLY v2 2/7] dt-bindings: serial: Add binding for rs485 bus termination GPIO Heiko Stuebner
2020-03-25 23:14 ` [PATCH DON'T APPLY v2 3/7] serial: 8250: Support " Heiko Stuebner
2020-03-30 14:51   ` Andy Shevchenko
2020-03-25 23:14 ` [PATCH v2 4/7] serial: 8250: Handle implementations not having TEMT interrupt using em485 Heiko Stuebner
2020-03-25 23:47   ` Giulio Benetti
2020-03-26  0:05     ` Heiko Stübner
2020-03-26  2:02       ` Giulio Benetti
2020-05-17 15:04         ` Heiko Stübner
2020-05-17 17:28           ` Giulio Benetti
2020-03-30 14:52   ` Andy Shevchenko
2020-05-02 13:49   ` Lukas Wunner
2020-05-05 16:38     ` Maarten Brock
2020-05-17 22:01     ` Heiko Stübner
2020-03-25 23:14 ` [PATCH v2 5/7] dt-bindings: serial: Add binding for rs485 receiver enable GPIO Heiko Stuebner
2020-03-30 14:54   ` Andy Shevchenko
2020-05-02 13:51   ` Lukas Wunner
2020-03-25 23:14 ` [PATCH v2 6/7] serial: 8250: Support separate rs485 rx-enable GPIO Heiko Stuebner
2020-03-30 14:56   ` Andy Shevchenko
2020-05-16 20:14   ` Lukas Wunner
2020-03-25 23:14 ` [PATCH v2 7/7] serial: 8250_dw: add em485 support Heiko Stuebner
2020-05-06 15:25   ` Andy Shevchenko

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).