mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sherry Sun <sherry.sun@nxp.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-imx@nxp.com
Subject: [PATCH 2/3] tty: serial: fsl_lpuart: disable the break condition when shutdown the uart port
Date: Wed, 14 Dec 2022 11:11:36 +0800	[thread overview]
Message-ID: <20221214031137.28815-3-sherry.sun@nxp.com> (raw)
In-Reply-To: <20221214031137.28815-1-sherry.sun@nxp.com>

Need to disable the break condition for lpuart driver when closing
the uart port like other uart drivers do.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
---
 drivers/tty/serial/fsl_lpuart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index f487d3d2effe..584b26e0b947 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1839,10 +1839,10 @@ static void lpuart32_shutdown(struct uart_port *port)
 	temp &= ~(UARTBAUD_TDMAE | UARTBAUD_RDMAE);
 	lpuart32_write(port, temp, UARTBAUD);
 
-	/* disable Rx/Tx and interrupts */
+	/* disable Rx/Tx and interrupts and break condition */
 	temp = lpuart32_read(port, UARTCTRL);
 	temp &= ~(UARTCTRL_TE | UARTCTRL_RE | UARTCTRL_ILIE |
-			UARTCTRL_TIE | UARTCTRL_TCIE | UARTCTRL_RIE);
+			UARTCTRL_TIE | UARTCTRL_TCIE | UARTCTRL_RIE | UARTCTRL_SBK);
 	lpuart32_write(port, temp, UARTCTRL);
 
 	spin_unlock_irqrestore(&port->lock, flags);
-- 
2.17.1


  parent reply	other threads:[~2022-12-14  3:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14  3:11 [PATCH 0/3] tty: serial: fsl_lpuart/imx: improve the TX break settings Sherry Sun
2022-12-14  3:11 ` [PATCH 1/3] tty: serial: fsl_lpuart: disable the CTS when send break signal Sherry Sun
2022-12-14  3:11 ` Sherry Sun [this message]
2022-12-14  3:11 ` [PATCH 3/3] tty: serial: imx: disable the break condition when shutdown the uart port Sherry Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221214031137.28815-3-sherry.sun@nxp.com \
    --to=sherry.sun@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®