Re: Where to put new keyboard driver

doctor@fruitbat.org
Sun, 8 Aug 1999 00:04:27 -0700 (PDT)


Riley Williams said ...
> Hi Bradley.
> >>> I need to write a keyboard driver for a new mips platform
> >>> (not a pc keyboard). Where should I put it? In drivers/char,
> >>> drivers/myplatform, or arch/mips/myplatform? I see keyboard
> >>> drivers in all these places. Where is the best place?
> >> Is it specific to your platform? If so, it belongs under arch
> >> somewhere, if not, it doesn't.
> > OK. Thanks for the advice. I will put it in arch/mips/myplatform.
> Nodz.
> > So probably the Amiga keyboard driver doesn't belong under
> > drivers/char, eh? :)
> The basic rule is that if the device works on multiple platforms with
> no changes to the driver code, then it goes under drivers, but if
> different platforms need different drivers, or it is specific to one
> platform, then it goes under arch. However, there are still some
> drivers in the kernel that were implemented before the arch tree came
> in, and I wouldn't be surprised to find that's one of them.

Hmmm... Does this mean that at some future time the various drivers that
*aren't* platform independent will be moved to arch/platform? It strikes
me that many of the directories in drivers/ right now (2.2 tree) do not
meet the multiple platforms qualification. That being the case, why not
simply add new drivers to the existing tree thereby keeping consistency
with current trends and let it all be moved later?

For example, acorn/, macintosh/, sgi/ and zorro/ all contain drivers for
a single different platform. zorro/, for example, is specific to the
Amiga. However, an amiga/ directory also exists under arch/ppc/ and
arch/m68k/. I presume that when someone (Linus?) reorganizes things that
zorro/ will be moved to the arch/.../amiga/ directories. Does that
further imply that the same kind of tree structure will be applied to
arch/platform?

Reason I'm asking is that there is a varient machine of the PowerMac,
called an Apple Network Server, that has an LCD display, unlike any other
PowerMac. A character driver for the LCD display has been written, the
only real question is where it should be placed. As the current source
tree has PowerMac drivers under devices/macintosh/ should the LCD device
driver be added to that directory or should a macintosh/ (or perhaps
ANS/) directory be added to arch/ppc and the new driver put there?

I'd like to get the ANS specific changes merged into the proper source
trees, and an answer to the above would greatly help towards that end.

> Best wishes from Riley.

-- 
Peter A. Castro (doctor@fruitbat.org) or (pcastro@us.oracle.com)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/