[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d75d1339-4539-330a-680b-2d940e603a72@kernel.org>
Date: Mon, 18 Jul 2022 09:02:09 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Michael Walle <michael@...le.cc>, Sherry Sun <sherry.sun@....com>
Cc: gregkh@...uxfoundation.org, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org, dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH 2/2] tty: serial: fsl_lpuart: writing a 1 and then a 0 to
trigger a break character
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
Powered by blists - more mailing lists