Subject: Re: guidelines for including a newly-created driver?
To: None <thorpej@nas.nasa.gov>
From: Mike Long <mike.long@analog.com>
List: port-i386
Date: 08/13/1996 11:03:05
>From: Jason Thorpe <thorpej@nas.nasa.gov>
>Date: Mon, 12 Aug 1996 19:08:36 -0700

>That will get it to pull in foo.c.  Now, if you need to put this in the 
>{b,c}devsw, it needs to have a "flag" generated:
>
>device foo
>attach foo at isa
>file	dev/isa/foo.c		foo needs-flag
>
>That will generate a "foo.h" in the compile directory, which will define 
>NFOO to 0 if no foo in config file, or 1 if foo is in the config file.

If it needs an entry in cdevsw, you also have to assign it a major
device number:

major	{foo = 29}

The major number is an index to the entry in cdevsw[].  I'm not sure
how block device major numbers are assigned.

You should also add appropriate bits to /dev/MAKDEV.local, to create
/dev/foo[0-9].
-- 
Mike Long <mike.long@analog.com>     <URL:http://www.shore.net/~mikel>
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil