1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.1/target/linux/bcm27xx/patches-6.1/950-0746-serial-sc16is7xx-Read-modem-line-state-at-startup.patch
Ycarus (Yannick Chabanois) 3743692973 Fix RPI5 support
2023-11-17 17:31:36 +01:00

28 lines
990 B
Diff

From 1bdd4fadaea3b6a2ae1e1b44989255ad16d4d640 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 13 Jun 2023 16:12:54 +0100
Subject: [PATCH] serial: sc16is7xx: Read modem line state at startup
This patch sets the driver modem line state to the actual line state
at driver startup.
See: https://github.com/raspberrypi/linux/issues/5501
Signed-off-by: Earl Schmidt <schmidt.earl.f@gmail.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/tty/serial/sc16is7xx.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1210,6 +1210,9 @@ static int sc16is7xx_startup(struct uart
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);