mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 10:29:37 +00:00
tty: serial: fsl_lpuart: fix the wrong return value in lpuart32_get_mctrl
Patche60c2991f1
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:e60c2991f1
("serial: fsl_lpuart: remove RTSCTS handling from get_mctrl()") Cc: stable <stable@vger.kernel.org> Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20210729083109.31541-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7f0909db76
commit
06e91df16f
1 changed files with 1 additions and 1 deletions
|
@ -1415,7 +1415,7 @@ static unsigned int lpuart_get_mctrl(struct uart_port *port)
|
||||||
|
|
||||||
static unsigned int lpuart32_get_mctrl(struct uart_port *port)
|
static unsigned int lpuart32_get_mctrl(struct uart_port *port)
|
||||||
{
|
{
|
||||||
unsigned int mctrl = 0;
|
unsigned int mctrl = TIOCM_CAR | TIOCM_DSR | TIOCM_CTS;
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
reg = lpuart32_read(port, UARTCTRL);
|
reg = lpuart32_read(port, UARTCTRL);
|
||||||
|
|
Loading…
Reference in a new issue