Re: Accessing serial port from kernel module

From: Alan Cox (
Date: Wed Jul 23 2003 - 09:25:43 EST

On Mer, 2003-07-23 at 15:15, Kurt Häusler wrote:
> What is the preferred way in Linux for my module to open the serial port device such as /dev/ttyS1.

Make your driver a line discipline is the normal approach in this case
(ok to be fair putting it all in user space is the normal case). Take a
look at slip.c to see how slip sits above terminal interfaces.

The user space only approach is to use pty/tty pairs as things like
xterm do. This gives you a "terminal/serial" device the other end of
which is your user space program which can do the conversions it wants
then talk to a real serial port

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

This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:49 EST