Skip to content

Commit 06e91df

Browse files
SherrySun5gregkh
authored andcommitted
tty: serial: fsl_lpuart: fix the wrong return value in lpuart32_get_mctrl
Patch e60c299 make the lpuart32_get_mctrl always return 0, actually this will break the functions of device which use flow control such as Bluetooth. For lpuart32 plaform, the hardware can handle the CTS automatically. So we should set TIOCM_CTS active. Also need to set CAR and DSR active. Patch has been tested on lpuart32 platforms such as imx8qm and imx8ulp. Fixes: e60c299 ("serial: fsl_lpuart: remove RTSCTS handling from get_mctrl()") Cc: stable <[email protected]> Signed-off-by: Sherry Sun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7f0909d commit 06e91df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/fsl_lpuart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ static unsigned int lpuart_get_mctrl(struct uart_port *port)
14151415

14161416
static unsigned int lpuart32_get_mctrl(struct uart_port *port)
14171417
{
1418-
unsigned int mctrl = 0;
1418+
unsigned int mctrl = TIOCM_CAR | TIOCM_DSR | TIOCM_CTS;
14191419
u32 reg;
14201420

14211421
reg = lpuart32_read(port, UARTCTRL);

0 commit comments

Comments
 (0)