Re: serial and tty driver

From: Theodore Tso
Date: Sat Feb 17 2007 - 19:48:45 EST

On Sat, Feb 17, 2007 at 12:24:22PM -0600, Paul Fulghum wrote:
> Mockern wrote:
> >I have a question, what is really difference between serial and tty
> >drivers?
> >
> >As I understand tty is high level and communicates with user space.
> The serial core implements many of the details of a tty
> driver in a common place so that individual hardware drivers
> (serial drivers) only need implement the hardware specific code.
> This prevents duplicating tty logic in many drivers,
> with the possibility of mistakes/inconsistency in the
> different tty drivers.
> The stand alone tty drivers are mostly legacy code from
> the time before serial core that have not been ported
> to be a serial drivers.

Not necessarily; there are a number of tty drivers, such as the
console drivers and pseudo-tty drivers that have absolutely nothing to
do with an RS-232 port.

On the other side of the argument, another factorization of the layers
that might have made sense was to move the functionality to the
high-level tty layer (or in the case of hangup code, all the way up to
the VFS layer as a generic sys_revoke functionality), but the reason
why it didn't is largely historical.

- Ted
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at