Add hardware handshaking to pseudo-tty and USB serial gadget

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

 



I'm interested in having support for hardware handshaking lines for both pseudo-tty (Unix 98 style) and USB serial gadget drivers. Unless I've missed something, it looks as though they don't support the hardware handshaking lines.

Has anyone worked on this already, for either pseudo-tty or USB serial gadget?

It sounds as though people have done pseudo-ttys with HW handshaking support--eg tty0tty project. However I'd rather implement this function in the kernel pseudo-terminal driver itself. Is there any reason not to do that?


I was wondering how to handle the HW lines on the master side of the pseudo-tty, and on the USB gadget device. It's the opposite way to a regular serial port (DCE rather than DTE), so you _write_ DSR, CTS, DCD and RING, and _read_ DTR and RTS. There could be two ways to do this:

1) Reverse normal operations, so do TIOCMSET of TIOCM_DSR, TIOCM_CD etc.

2) Act like a normal port, and "cross-over" signals. So do
TIOCMSET of TIOCM_DTR, which changes DSR on the slave;
TIOCMGET of TIOCM_DSR to read the state of DTR set by the slave. Etc.
What about setting the slave's DCD and RING? Maybe do TIOCMSET of TIOCM_OUT1 and TIOCM_OUT2 on the master.

Same question for the USB serial gadget.

So which of those choices would be better? I think I prefer (2) because the user code stays more the same whether it's talking to a master device or slave device.

Regards,
Craig McQueen


--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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