Subject: Re: Adding a new tty device
To: Bruce Martin <BruceM@cat.co.za>
From: Perry E. Metzger <perry@piermont.com>
List: netbsd-help
Date: 07/28/1999 11:47:05
Bruce Martin <BruceM@cat.co.za> writes:
> I have written a device driver for a serial port board that we have, and
> it works fine in that it can read and write serial data. However, I now
> want to implement it as a tty device on our system, so that I can use
> all the usual tty functions on it. How do I go about this? Also, do I
> need to write any other device driver functions (besides open, close,
> read, write, poll, mmap, intr) to achieve this. Are there any books/docs
> around describing this process?

The docs on most of this are poor. In general, I'd like to see far
more of this stuff documented in section 9 of the manual (which see)
and I'm very happy to take contributions for it. I would love to see
the entire kernel eventually documented in section 9.

Meanwhile, you probably have work to do. In this specific case, I'd
look at how other serial devices are handled, and glean all I could
from "The Design and Implementation of the 4.4BSD Operating System",
which is not up to date with NetBSD but which is not entirely
inaccurate either...

Perry