Re: Mouse minor chaos

Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Thu, 18 Dec 1997 10:12:51 +0100 (CET)


On Wed, 17 Dec 1997, Michael Schmitz wrote:
> At 1:26 PM +0100 12/15/97, Geert Uytterhoeven wrote:
> >What's the logic behind the different mouse minors for different busmice?
> >
> >Wouldn't it be better to dynamically assign a minor when a driver registers a
> >mouse? That way the users doesn't have to care anymore about the device names
> >that are used for his mice, all he needs to know is that his first mouse is
> >/dev/mouse0, his second mouse is /dev/mouse1, etc...
>
> Would be nice to have that (though probably few people use more than one
> mouse).
> How does the user know which mouse device corresponds to which mouse? And

Very simple: the various mouse drivers could dump their number to the console
on initialization, cfr. the Ethernet drivers:

mouse0: armadillo mouse driver installed

BTW, this is similar to the question `how does the user know which SCSI device
corresponds to which number'?

> would that mean taking mice out of the miscdev major, or reserving a range
> of minors?

That's up to hpa. He maintains those numbers. But we could e.g. keep on using
the first 16 minors of the misc major. Or isn't that sufficient? Maybe 128
minors for people with zillions of ADB and USB mice :-)

> >Another advantage is that you don't need to register a mouse minor if you
> >write
> >a new busmouse driver (e.g. the ADB mouse driver (work in progress)).
>
> The ADB mouse driver (stalled, still waiting for news from the PPC ASB
> maintainer) would go into the ADB device class, but your suggestion would
> be a possible alternative.

IMHO the ADB device should be used for `special' things that aren't possible
elseway. A mouse is simply a mouse. The same is true for USB mice.

Greetings,

Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium