Skip to content

Commit

Permalink
serial: sc16is7xx: Read modem line state at startup
Browse files Browse the repository at this point in the history
This patch sets the driver modem line state to the actual line state
at driver startup.

See: #5501

Signed-off-by: Earl Schmidt <schmidt.earl.f@gmail.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
  • Loading branch information
pelwell authored and popcornmix committed Jul 14, 2023
1 parent 00ad14b commit f156dbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/tty/serial/sc16is7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,9 @@ static int sc16is7xx_startup(struct uart_port *port)
SC16IS7XX_IER_MSI_BIT;
sc16is7xx_port_write(port, SC16IS7XX_IER_REG, val);

/* Initialize the Modem Control signals to current status */
one->old_mctrl = sc16is7xx_get_hwmctrl(port);

/* Enable modem status polling */
spin_lock_irqsave(&port->lock, flags);
sc16is7xx_enable_ms(port);
Expand Down

0 comments on commit f156dbc

Please sign in to comment.