Subject: Re: Abstracting pckbc(4)
To: None <tech-kern@netbsd.org>
From: Ben Harris <bjh21@NetBSD.org>
List: tech-kern
Date: 02/06/2004 00:00:29
On Sun, 1 Feb 2004, Ben Harris wrote:

> At the moment, pckbd(4) and pms(4) can only attach at pckbc(4).  This is a
> bit of a nuisance, since some systems (e.g. those supported by
> NetBSD/acorn32) have AT keyboards and PS/2 mice handled by other chips.
> I'm currently working on building an abstraction layer, but I'd like some
> comments from other people on how it will work.

No-one suggested that this idea was wrong, so I've proceeded as planned,
and I've now got pckbport.c (the mid-layer) largely written, along with a
comtroller driver for the keyboard interface on the ARM IOMD.  I've also
got versionfs of pckbd.c and pms.c that go with this: they're identical to
the current versions apart from having occurrences of "pckbc" changed to
"pckbport".  I haven't attempted to support hot-plugging, because it
looked both difficult and independent of what I'm currently doing.

There are still a couple of places where pckbport needs calls into the
controller driver:  pckbport_set_poll() needs to be able to slurp data out
of the controller queue, but I think pckbport_poll_data1() might be good
enough for this.  Also, pckbport_cleanup() might need to do a more
vigorous flush than pckbport_flush() currently does.

In addition, I need to sort out the necessary changes to make pckbc(4)
and sakbc(4) use pckbport(9), write manual pages for pckbport(9) and
iomdkbc(4), and probably clean things (such as console attachment for
iomdkbc(4)) up a little.

Work-in-progress sources are at
<ftp://ftp.netbsd.org/pub/NetBSD/misc/bjh21/pckbport-20040205.tar.gz> if
anyone wants to take a look.

-- 
Ben Harris                                                   <bjh21@NetBSD.org>
Portmaster, NetBSD/acorn26           <URL:http://www.NetBSD.org/Ports/acorn26/>