lkml.org 
[lkml]   [2022]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] tty: serial: fsl_lpuart: writing a 1 and then a 0 to trigger a break character
From
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

\
 
 \ /
  Last update: 2022-07-18 09:02    [W:0.062 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site