serial: sc16is7xx: Clear RS485 bits in the shutdown
authorHui Wang <hui.wang@canonical.com>
Tue, 8 Mar 2022 11:00:42 +0000 (19:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:35:03 +0000 (16:35 +0200)
commit170a08ad3d1a184f3f84e5d56031541740c7f874
tree04ccda20635fb0e92763daf0763aecd1daad8b97
parent5dce84f475d13b773a1a4c823581cab25044d86a
serial: sc16is7xx: Clear RS485 bits in the shutdown

[ Upstream commit 927728a34f11b5a27f4610bdb7068317d6fdc72a ]

We tested RS485 function on an EVB which has SC16IS752, after
finishing the test, we started the RS232 function test, but found the
RTS is still working in the RS485 mode.

That is because both startup and shutdown call port_update() to set
the EFCR_REG, this will not clear the RS485 bits once the bits are set
in the reconf_rs485(). To fix it, clear the RS485 bits in shutdown.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20220308110042.108451-1-hui.wang@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/sc16is7xx.c