]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: fsl_lpuart: fix the wrong return value in lpuart32_get_mctrl
authorSherry Sun <sherry.sun@nxp.com>
Thu, 29 Jul 2021 08:31:09 +0000 (16:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Jul 2021 15:05:59 +0000 (17:05 +0200)
commit367ab3a10ef26e54431249e96c263fab110b10d0
tree1f45f2efecd0972494c79f9f8da3d1338cf7e334
parent4566980cbcd5a7fd9ac88be7fd6a96547c33245e
tty: serial: fsl_lpuart: fix the wrong return value in lpuart32_get_mctrl

Patch 40403fc2e61c 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: 40403fc2e61c ("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>
drivers/tty/serial/fsl_lpuart.c