mbox series

[v6,0/2] tty: serial: Add RS422 serial interface

Message ID 20231201071554.258607-1-crescentcy.hsieh@moxa.com
Headers show
Series tty: serial: Add RS422 serial interface | expand

Message

Crescent CY Hsieh Dec. 1, 2023, 7:15 a.m. UTC
This patch series adds RS422 flag to switch the serial interface into
RS422 if supported by using "TIOCSRS485" ioctl command.

---
Changes from v5 to v6:
- Split patch into cleanup patch and new feature patch
- [PATCH v6 2/2]:
	- Add termination resistors support for RS422

Changes from v4 to v5:
- Revise commit message.
- Delete RS422 checks within uart_set_rs485_termination().

Changes from v3 to v4:
- Include 'linux/const.h' header in '/include/uapi/linux/serial.h'
- Replace BIT() with _BITUL() which defined in
  '/include/uapi/linux/const.h'

Changes from v2 to v3:
- Remove "SER_RS422_ENABLED" flag from legacy flags.
- Revise "SER_RS422_ENABLED" into "SER_RS485_MODE_RS422".
- Remove the code which checks the conflicts between SER_RS485_ENABLED
  and SER_RS422_ENABLED.
- Add return check in uart_set_rs485_termination().

Changes from v1 to v2:
- Revise the logic that checks whether RS422/RS485 are enabled
  simultaneously.

v5: https://lore.kernel.org/all/20231121095122.15948-1-crescentcy.hsieh@moxa.com/
v4: https://lore.kernel.org/all/20231113094136.52003-1-crescentcy.hsieh@moxa.com/
v3: https://lore.kernel.org/all/20231108060719.11775-1-crescentcy.hsieh@moxa.com/
v2: https://lore.kernel.org/all/20231101064404.45711-1-crescentcy.hsieh@moxa.com/
v1: https://lore.kernel.org/all/20231030053632.5109-1-crescentcy.hsieh@moxa.com/

Crescent CY Hsieh (2):
  tty: serial: Cleanup the bit shift with macro
  tty: serial: Add RS422 flag to struct serial_rs485

 drivers/tty/serial/serial_core.c |  6 ++++++
 include/uapi/linux/serial.h      | 19 +++++++++++--------
 2 files changed, 17 insertions(+), 8 deletions(-)