Re: Config-option for PS/2 mouse detection at boot time [patch]

Richard Gooch (rgooch@atnf.csiro.au)
Fri, 11 Dec 1998 23:04:31 +1100


Pavel Machek writes:
> Hi!
>
> > > Please correct me if this patch is bad and there is a better way to really
> > > detect the presence of a ps2-mouse from userland.
> >
> > I think what would be better would be to not patch to kernel to not
> > call misc_register() when the PS/2 mouse is not detected. I note in my
> > boot logs that the PS/2 mouse was not detected (fair enough: I don't
> > have one), but I still see it in /proc/misc. That should be fixed.
>
> It depends: I do not have mouse connected on boot but want to connect
> it at runtime. How should I do it?
>
> PS: Don't tell me I should not do it. I *have to*. Braindamaged
> thinkpad bios will not boot when it fails to talk to mouse, and it
> fails because I'm really plugging keyboard in :-).

Easy. Wait for the BIOS to finish it's thing, then plug in the PS/2
mouse before Linux looks for it :-)

Seriously though, I see your problem. I guess the simplest is then to
just leave the misc_register() of the PS/2 device as is. For the
original poster: open /dev/psaux and if it fails you don't have a PS/2
mouse connected.

Regards,

Richard....

-
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/