Subject: Re: Apollo keyboard, serial drivers (announce)
To: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
From: mike smith <miff@spam.frisbee.net.au>
List: port-hp300
Date: 04/16/1997 23:53:32
Ignatios Souvatzis wrote:
> 
> You don't understand.
> 
> The mouse driver has no way to know what particular hardware is
> connected to the serial interface, and which to which one.

That depends on _where_ the mouse driver is.  If it's in an MI
module, whether it be a daemon, a portable console or an X server,
indeed it doesn't.

If, however, you were to suggest that for most plaforms which come
with specific rodents (eg. Sun, HP, Atari, etc.), the keyboard
driver (or some close relative in most cases) was responsible for
translating the specific rodent protocol to a "standard" protocol,
you could have your MI code support the few (hah!) serial mouse
protocols, one of which was the target protocol for these
"custom" translators.

This wins in quite a few situations; the "portable" (serial, ps/2)
mice are already supported by known-working code, so you can 
reuse that.  The machine-specific mice often have code that's
known to support them in their specific interface, so you don't
have to move it from where it is.

It only loses if you want to support platform A's custom rodent on
platform B.
 
> I don't think its wise to do dozens of kernel/user
> translations. Wouldn't matter too much for mice at 1200 bps, but don't
> want to start this business.

Fair enough.  How about loading rodent lkm's?  Have platforms that
have non-tty mouse interfaces updated, and then write either a 
single mega-mouse lkm, or a pile of mini-mouse lkm's that just 
know how to hop on a tty inside the kernel (think "line discipline")
and provide a translated output, again in a standard format.  This
way you win all the serial mice, plus platform-dependent mice in 
a platform-independant fashion, with only a single boundary 
crossing?
 
> Why not a standard mouse library, with (maybe) a standard way to set
> device and (for non-Event, serial mice/tablets) protocol from the
> environment/a config file?

Sure; that's similar to the lkm approach, just putting the translator
somewhere else.
 
>         -is

--
Mike Smith  *BSD hack  Unix hardware collector
The question "why are the fundamental laws of nature mathematical"
invites the trivial response "because we define as fundamental those
laws which are mathematical".  Paul Davies, _The_Mind_of_God_