Merge tag 'tty-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial driver updates from Greg KH:
 "Here is the "big" set of tty/serial driver changes for 6.2-rc1.

  As in previous kernel releases, nothing big here at all, just some
  small incremental serial/tty layer cleanups and some individual driver
  additions and fixes. Highlights are:

   - serial helper macros from Jiri Slaby to reduce the amount of
     duplicated code in serial drivers

   - api cleanups and consolidations from Ilpo Järvinen in lots of
     serial drivers

   - the usual set of n_gsm fixes from Daniel Starke as that code gets
     exercised more

   - TIOCSTI is finally able to be disabled if requested (security
     hardening feature from Kees Cook)

   - fsl_lpuart driver fixes and features added

   - other small serial driver additions and fixes

  All of these have been in linux-next for a while with no reported
  problems"

* tag 'tty-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (97 commits)
  serial: atmel: don't stop the transmitter when doing PIO
  serial: atmel: cleanup atmel_start+stop_tx()
  tty: serial: fsl_lpuart: switch to new dmaengine_terminate_* API
  serial: sunsab: Fix error handling in sunsab_init()
  serial: altera_uart: fix locking in polling mode
  serial: pch: Fix PCI device refcount leak in pch_request_dma()
  tty: serial: fsl_lpuart: Use pm_ptr() to avoid need to make pm __maybe_unused
  tty: serial: fsl_lpuart: Add runtime pm support
  tty: serial: fsl_lpuart: enable wakeup source for lpuart
  serdev: Replace poll loop by readx_poll_timeout() macro
  tty: synclink_gt: unwind actions in error path of net device open
  serial: stm32: move dma_request_chan() before clk_prepare_enable()
  dt-bindings: serial: xlnx,opb-uartlite: Drop 'contains' from 'xlnx,use-parity'
  serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle.
  serial: amba-pl011: avoid SBSA UART accessing DMACR register
  tty: serial: altera_jtaguart: remove struct altera_jtaguart
  tty: serial: altera_jtaguart: use uart_port::read_status_mask
  tty: serial: altera_jtaguart: remove unused altera_jtaguart::sigs
  tty: serial: altera_jtaguart: remove flag from altera_jtaguart_rx_chars()
  n_tty: Rename tail to old_tail in n_tty_read()
  ...
This commit is contained in:
Linus Torvalds
2022-12-16 03:31:56 -08:00
92 changed files with 1454 additions and 1253 deletions

View File

@@ -107,33 +107,50 @@ struct serial_icounter_struct {
int reserved[9];
};
/*
/**
* struct serial_rs485 - serial interface for controlling RS485 settings.
* @flags: RS485 feature flags.
* @delay_rts_before_send: Delay before send (milliseconds).
* @delay_rts_after_send: Delay after send (milliseconds).
* @addr_recv: Receive filter for RS485 addressing mode
* (used only when %SER_RS485_ADDR_RECV is set).
* @addr_dest: Destination address for RS485 addressing mode
* (used only when %SER_RS485_ADDR_DEST is set).
* @padding0: Padding (set to zero).
* @padding1: Padding (set to zero).
* @padding: Deprecated, use @padding0 and @padding1 instead.
* Do not use with @addr_recv and @addr_dest (due to
* overlap).
*
* Serial interface for controlling RS485 settings on chips with suitable
* support. Set with TIOCSRS485 and get with TIOCGRS485 if supported by your
* platform. The set function returns the new state, with any unsupported bits
* reverted appropriately.
*
* The flag bits are:
*
* * %SER_RS485_ENABLED - RS485 enabled.
* * %SER_RS485_RTS_ON_SEND - Logical level for RTS pin when sending.
* * %SER_RS485_RTS_AFTER_SEND - Logical level for RTS pin after sent.
* * %SER_RS485_RX_DURING_TX - Full-duplex RS485 line.
* * %SER_RS485_TERMINATE_BUS - Enable bus termination (if supported).
* * %SER_RS485_ADDRB - Enable RS485 addressing mode.
* * %SER_RS485_ADDR_RECV - Receive address filter (enables @addr_recv). Requires %SER_RS485_ADDRB.
* * %SER_RS485_ADDR_DEST - Destination address (enables @addr_dest). Requires %SER_RS485_ADDRB.
*/
struct serial_rs485 {
__u32 flags; /* RS485 feature flags */
#define SER_RS485_ENABLED (1 << 0) /* If enabled */
#define SER_RS485_RTS_ON_SEND (1 << 1) /* Logical level for
RTS pin when
sending */
#define SER_RS485_RTS_AFTER_SEND (1 << 2) /* Logical level for
RTS pin after sent*/
__u32 flags;
#define SER_RS485_ENABLED (1 << 0)
#define SER_RS485_RTS_ON_SEND (1 << 1)
#define SER_RS485_RTS_AFTER_SEND (1 << 2)
#define SER_RS485_RX_DURING_TX (1 << 4)
#define SER_RS485_TERMINATE_BUS (1 << 5) /* Enable bus
termination
(if supported) */
#define SER_RS485_TERMINATE_BUS (1 << 5)
#define SER_RS485_ADDRB (1 << 6)
#define SER_RS485_ADDR_RECV (1 << 7)
#define SER_RS485_ADDR_DEST (1 << 8)
/* RS-485 addressing mode */
#define SER_RS485_ADDRB (1 << 6) /* Enable addressing mode */
#define SER_RS485_ADDR_RECV (1 << 7) /* Receive address filter */
#define SER_RS485_ADDR_DEST (1 << 8) /* Destination address */
__u32 delay_rts_before_send; /* Delay before send (milliseconds) */
__u32 delay_rts_after_send; /* Delay after send (milliseconds) */
__u32 delay_rts_before_send;
__u32 delay_rts_after_send;
/* The fields below are defined by flags */
union {