Re: [PATCH 2/2] tty: serial: fsl_lpuart: writing a 1 and then a 0 to trigger a break character

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux