From: Jiri Slaby <jirislaby@kernel.org>
To: Michael Walle <michael@walle.cc>, Sherry Sun <sherry.sun@nxp.com>
Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org, dl-linux-imx <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: Mon, 18 Jul 2022 09:02:09 +0200 [thread overview]
Message-ID: <d75d1339-4539-330a-680b-2d940e603a72@kernel.org> (raw)
In-Reply-To: <61c525fc87d6586c024cd6e42fcf876d@walle.cc>
On 15. 07. 22, 13:52, Michael Walle wrote:
>> Seems we have the different understanding of the break_ctl(port,ctl)
>> callback. The original break_ctl(tty,-1) in lpuart will not send the
>> break signal until we call break_ctl(tty,0).
>
> That is not correct. The TX linue goes low as soon as the SBK bit
> is set. See below.
In that case…
>> Per my understanding of
>> "If ctl is nonzero, the break signal should be transmitted", call
>> break_ctl(tty,-1) is enough the send one break signal, now my patch
>> makes the behavior align with my understanding.
>
> As I said, Greg should clarify here.
>
> In any case, I've checked the hardware (LS1028A) and as soon as you
> set the SBK bit, the TX line goes low (TTL levels) as expected. It
> will go to high again as soon as you clear the bit again.
>
> So to me it seems there is nothing wrong here. Also have a look
> at man ioctl_tty:
>
> TIOCSBRK
> Turn break on, that is, start sending zero bits.
>
> TIOCCBRK
> Turn break off, that is, stop sending zero bits.
>
> So to send one break "character", you need to do ioctl(TIOCSBRK)
> followed by an ioctl(TIOCCBRK).
… you're right.
regards,
--
js
next prev parent reply other threads:[~2022-07-18 7:02 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
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 [this message]
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=d75d1339-4539-330a-680b-2d940e603a72@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=michael@walle.cc \
--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