public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* Move RS485 implementation from drivers to serial core (v3)
@ 2022-02-22  1:14 Lino Sanfilippo
  2022-02-22  1:14 ` [PATCH v3 1/9] serial: core: move RS485 configuration tasks from drivers into core Lino Sanfilippo
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Lino Sanfilippo @ 2022-02-22  1:14 UTC (permalink / raw)
  To: gregkh, jirislaby, u.kleine-koenig
  Cc: linux-arm-kernel, alexandre.belloni, mcoquelin.stm32,
	richard.genoud, festevam, s.hauer, linux, alexandre.torgue,
	ludovic.desroches, lukas, linux-imx, kernel, linux-serial,
	shawnguo, linux-stm32, linux-kernel, p.rosenberger

This patch series is an attempt to simplify rs485 implementation in drivers
by moving the following tasks out of the drivers into the serial core:

- ensure sane RTS settings: in case of an invalid configuration (both RTS
  after send and RTS on send set or both unset) enable RTS on send and
  disable RTS after send

- nullify the padding field of the serial_rs485 struct before it is
  returned to userspace

- copy the configuration stored in the serial_rs485 struct to the port
  configuration if setting the configuration in the driver was successfull

- limit the RTS delay to 100ms


Redundant code has been removed from the following drivers for now:

- atmel
- fsl_lpuart
- amba
- imx
- max310x
- omap-serial
- sc16is7xx
- stm32-usart

The code has been tested with the amba pl011 driver. This series applies
against Gregs tty-testing branch.

Changes in v2:
- use a makro for max RTS delays and comment it (as requested by Jiri)
- add a comment concerning the memset of a structures padding field
- correct typos in the commit message (found by Uwe) 
- rephrase all commit messages to make more clear that function 
  uart_set_rs485_config() has been extended by checks and other
  functionalities (as requested by Uwe)

Changes in v3:
- add warning messages if the serial core corrects RS485 values (as requested by Lukas Wunner)
- dont expose the macro for max RTS delays to userspace (as requested by Greg) 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-02-25 10:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-22  1:14 Move RS485 implementation from drivers to serial core (v3) Lino Sanfilippo
2022-02-22  1:14 ` [PATCH v3 1/9] serial: core: move RS485 configuration tasks from drivers into core Lino Sanfilippo
2022-02-22  6:51   ` Jiri Slaby
2022-02-22  6:52     ` Jiri Slaby
2022-02-25 10:16       ` Aw: " Lino Sanfilippo
2022-02-22  1:14 ` [PATCH v3 2/9] serial: amba-pl011: remove redundant code in rs485_config Lino Sanfilippo
2022-02-22  1:14 ` [PATCH v3 3/9] serial: stm32: " Lino Sanfilippo
2022-02-22  1:14 ` [PATCH v3 4/9] serial: sc16is7xx: remove redundant check " Lino Sanfilippo
2022-02-22  1:14 ` [PATCH v3 5/9] serial: omap: remove redundant code " Lino Sanfilippo
2022-02-22  1:14 ` [PATCH v3 6/9] serial: max310: remove redundant memset " Lino Sanfilippo
2022-02-22  1:14 ` [PATCH v3 7/9] serial: imx: remove redundant assignment " Lino Sanfilippo
2022-02-22  1:14 ` [PATCH v3 8/9] serial: fsl_lpuart: remove redundant code in rs485_config functions Lino Sanfilippo
2022-02-22  1:14 ` [PATCH v3 9/9] serial: atmel: remove redundant assignment in rs485_config Lino Sanfilippo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox