Skip to content

Add RS485 9th bit addressing mode support to DW UART

Ilpo Järvinen linux-api linux-arch linux-arm-kernel linux-doc linux-mips linux-serial lkml 9 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest6 patches 4 repliesIn review
  2. v86 patches 3 repliesSuperseded
  3. v76 patches 9 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v66 patches3 repliesSuperseded
v510 patches9 repliesApplied
v413 patches4 repliesSuperseded
v312 patches13 repliesSuperseded
v212 patches3 repliesSuperseded
v17 patches26 repliesSuperseded

Changes in v9 from the cover letter

- Tweak comments (struct fields info & one callback style correction)
- Add struct layout checks as static_asserts

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6serial: 8250: make saved LSR largerdrivers/tty/serial/8250/8250.h drivers/tty/serial/8250/8250_exar.c drivers/tty/serial/8250/8250_fsl.c +4 more+20 -201 reply
2/6serial: 8250: create lsr_save_maskdrivers/tty/serial/8250/8250.h drivers/tty/serial/8250/8250_core.c drivers/tty/serial/8250/8250_dw.c +1 more+7 -20 replies
3/6serial: 8250_lpss: Use 32-bit readsdrivers/tty/serial/8250/8250_lpss.c+1 -10 replies
4/6serial: take termios_rwsem for ->rs485_config() & pass termios as paramdrivers/tty/serial/8250/8250.h drivers/tty/serial/8250/8250_dwlib.c drivers/tty/serial/8250/8250_exar.c +16 more+38 -252 replies
5/6serial: Support for RS-485 multipoint addressesDocumentation/driver-api/serial/driver.rst Documentation/driver-api/serial/serial-rs485.rst drivers/tty/serial/serial_core.c +3 more+71 -41 reply
6/6serial: 8250_dwlib: Support for 9th bit multipoint addressingdrivers/tty/serial/8250/8250_dwlib.c+101 -10 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchAndy Shevchenko
1/6R-b
2/6R-b
3/6R-b
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [PATCH v9 0/6] Add RS485 9th bit addressing mode support to DW UART

This patchset adds RS-485 9th bit addressing mode support to the DW UART driver and the necessary serial core bits to handle it. The addressing mode is configured through ->rs485_config() as was requested during the review of the earlier versions. The line configuration related ADDRB is still kept in ktermios->c_cflag to be able to take account the extra addressing bit while calculating timing, etc. but it is set/cleared by ->rs485_config().

v8 -> v9:
- Tweak comments (struct fields info & one callback style correction)
- Add struct layout checks as static_asserts

v7 -> v8:
- Use anonymous union/struct in serial_rs485 to create "v2" of it
- Remove a stray newline change
- Reorder local var declarations
- Put ktermios param before serial_rs485 for rs485_config

v6 -> v7:
- Fixed typos in documentation & comment
- Changes lsr typing from unsigned int to u16

v5 -> v6:
- Reorder remaining patches
- LSR changes are simpler due to helper added by LSR fix series
- Depend on rs485_struct sanitization on catching much of invalid config
- In order to be able to alter ADDRB in termios .c_cflag within .rs485_config(), take termios_rwsem and pass ktermios to it.
- Moved addressing mode setup entirely into .rs485_config()
- Use ndelay() instead of udelay() (uart_port->frame_time is in nsecs)

Ilpo Järvinen (6):
serial: 8250: make saved LSR larger
serial: 8250: create lsr_save_mask
serial: 8250_lpss: Use 32-bit reads
serial: take termios_rwsem for ->rs485_config() & pass termios as
param
serial: Support for RS-485 multipoint addresses
serial: 8250_dwlib: Support for 9th bit multipoint addressing

 Documentation/driver-api/serial/driver.rst    |   2 +
 .../driver-api/serial/serial-rs485.rst        |  26 ++++-
 drivers/tty/serial/8250/8250.h                |   9 +-
 drivers/tty/serial/8250/8250_core.c           |   4 +
 drivers/tty/serial/8250/8250_dw.c             |   2 +-
 drivers/tty/serial/8250/8250_dwlib.c          | 105 +++++++++++++++++-
 drivers/tty/serial/8250/8250_exar.c           |  11 +-
 drivers/tty/serial/8250/8250_fintek.c         |   2 +-
 drivers/tty/serial/8250/8250_fsl.c            |   2 +-
 drivers/tty/serial/8250/8250_ingenic.c        |   2 +-
 drivers/tty/serial/8250/8250_lpc18xx.c        |   2 +-
 drivers/tty/serial/8250/8250_lpss.c           |   2 +-
 drivers/tty/serial/8250/8250_omap.c           |   7 +-
 drivers/tty/serial/8250/8250_pci.c            |   2 +-
 drivers/tty/serial/8250/8250_port.c           |  20 ++--
 drivers/tty/serial/amba-pl011.c               |   2 +-
 drivers/tty/serial/ar933x_uart.c              |   2 +-
 drivers/tty/serial/atmel_serial.c             |   2 +-
 drivers/tty/serial/fsl_lpuart.c               |   4 +-
 drivers/tty/serial/imx.c                      |   2 +-
 drivers/tty/serial/max310x.c                  |   2 +-
 drivers/tty/serial/mcf.c                      |   3 +-
 drivers/tty/serial/omap-serial.c              |   3 +-
 drivers/tty/serial/sc16is7xx.c                |   2 +-
 drivers/tty/serial/serial_core.c              |  36 +++++-
 drivers/tty/serial/stm32-usart.c              |   2 +-
 drivers/tty/tty_ioctl.c                       |   4 +
 include/linux/serial_8250.h                   |   7 +-
 include/linux/serial_core.h                   |   1 +
 include/uapi/asm-generic/termbits-common.h    |   1 +
 include/uapi/linux/serial.h                   |  20 +++-
 31 files changed, 238 insertions(+), 53 deletions(-)
Signature · 1 line
2.30.2