Performing a hardware reset for a PS/2 keyboard/mouse

Daniel Pittman (daniel@danann.net)
12 Nov 1998 13:42:33 +1100


I use Linux (2.1.x) on my laptop; this works very well except for one small
problem.

The laptop has external connectors for a PS/2 keyboard and mouse, something
I like to use (beats the touch pad/laptop keyboard). I can happily have it
work with the internal keyboard and mouse, as well as hot-plug an external
pair into the machine.

The hardware has a small problem with hot-swapping connections though. I
can happily work on the internal hardware, plug in external hardware and
unplug it again - the system works just fine.

Try and connect a second external device though and bang - no response. The
actions from the keyboard and mouse plugged in externally seem to be from
misaligned input data - using them results in random actions that don't
quite match up, like using a 2 byte driver with a 3 byte serial mouse.

So, the problem seems to be that the PS/2 hardware is out of sync with the
external keyboard and mouse. The obvious solution would be to have the
hardware reset itself, restoring sync.

I suspect that this could be done in a nice, silent fashion from inside the
PS/2 keyboard driver without disrupting application software using the PS/2
mouse or keyboard.

So, my question is: is there already a way to tell the keyboard driver to
perform a hardware reset? From consulting the source it looks like the only
time this occurs is during the driver initialisation, something that is a
little out of the question for a built-in driver (or a modules with existing
software still using it).

If there does not exist this facility yet, I will endeavour to add this
functionality myself; I just don't want to reinvent the wheel if I can
avoid it.

Thanks,
Daniel Pittman

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