public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Sherry Sun <sherry.sun@nxp.com>
Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-imx@nxp.com
Subject: Re: [PATCH 2/2] tty: serial: fsl_lpuart: writing a 1 and then a 0 to trigger a break character
Date: Fri, 15 Jul 2022 08:47:00 +0200	[thread overview]
Message-ID: <509669b26b5899088e9b77ed94d103ee@walle.cc> (raw)
In-Reply-To: <20220715025944.11076-3-sherry.sun@nxp.com>

Hi,

Am 2022-07-15 04:59, schrieb Sherry Sun:
> According to the lpuart reference manual, need to writing a 1 and then 
> a
> 0 to the UARTCTRL_SBK field queues a break character in the transmit
> data stream. Only writing a 1 cannot trigger the break character, so 
> fix
> it.

I don't think this is correct. The tty core will already call this:
   .break_ctl(port, 1)
   usleep()
   .break_ctl(port, 0)

So you'll have your 1->0 transition.

My RM from the LS1028A says the following:

| Writing a 1 and then a 0 to SBK queues a break character in the
| transmit data stream. Additional break characters of 10 to 13,
| or 13 to 16 if LPUART_STATBRK13] is set, bit times of logic 0
| are queued as long as SBK is set. Depending on the timing of
| the set and clear of SBK relative to the information currently
| being transmitted, a second break character may be queued
| before software clears SBK.

To me it seems that setting the SBK bit just pulls the TX line
low and releasing it will return to normal transmitter mode.

-michael

  reply	other threads:[~2022-07-15  6:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15  2:59 [PATCH 0/2] fsl_lpuart: fix the bugs in received break signal count and send break signal Sherry Sun
2022-07-15  2:59 ` [PATCH 1/2] tty: serial: fsl_lpuart: correct the count of break characters Sherry Sun
2022-07-15  6:58   ` Michael Walle
2022-07-15  7:22     ` Sherry Sun
2022-07-15 12:33   ` Michael Walle
2022-07-15  2:59 ` [PATCH 2/2] tty: serial: fsl_lpuart: writing a 1 and then a 0 to trigger a break character Sherry Sun
2022-07-15  6:47   ` Michael Walle [this message]
2022-07-15  7:20     ` Sherry Sun
2022-07-15  7:42       ` Michael Walle
2022-07-15  9:18         ` Sherry Sun
2022-07-15 11:52           ` Michael Walle
2022-07-18  7:02             ` Jiri Slaby
2022-07-22  9:41               ` 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=509669b26b5899088e9b77ed94d103ee@walle.cc \
    --to=michael@walle.cc \
    --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 \
    --cc=sherry.sun@nxp.com \
    /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