Subject: Re: Detecting zs keyboard
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-sparc
Date: 04/14/2000 14:57:51
On Fri, 14 Apr 2000, der Mouse wrote:

> > I've been thinking about changing the way the keyboard/mouse are
> > configured so instead of hardwiring them to a particular zs instance,
> > have them check for the `keyboard:' OBP property and fail to attach
> > if it does not exist.  That way we can wildcard all the kbd/ms/zstty
> > device nodes.
> 
> I don't like the prospect.  Why?
> 
> Because it makes it impossible to hook a keyboard up to a normal serial
> port with level-shifting electronics and then proceed to configure it
> as and use it as a keyboard.  (Yes, I have done this.)
> 
> It also makes it impossible to use the level-shifting electronics in
> the other direction to use the keyboard and mouse ports as serial
> lines, a la the FOUR_TTYS config the sun3 has.
> 
> Unless of course there would be a way for the config file to override
> the autodetection either way, in which case I withdraw my objection.

What we could do is only trigger the OBP (?) detection if the probe
routine is handed a wildcard attachment.

Thus

kbd* at zsc? channel ?

would do the OBP checking, while

kbd0 at zsc0 channel 0

would not.

Also, I think the sun/sparc code already supports specific attachments
having a higher priority than wildcards, so you could have"

zstty* at zsc? channel ?
kbd0   at zsc0 channel 0

and kbd0 would bind to zsc0 channel 0 even though the zstty probe on the
same zsc/channel matched too.

Take care,

Bill