Re: [PATCH] SERIO_USERDEV: direct userspace access to mouse/keyboa=

From: Sau Dan Lee
Date: Mon May 10 2004 - 04:18:14 EST


>>>>> "Andrew" == Andrew Morton <akpm@xxxxxxxx> writes:

Andrew> Tuukka Toivonen <tuukkat@xxxxxxxxxx> wrote:
>> SERIO_USERDEV - Direct serial input device access for
>> userspace =20 This driver provides direct access from usespace
>> into PS/2 (or psaux) serial ports used usually for input
>> devices such as mouses and keyboards=

Andrew> And given that the external device generates a stream of
Andrew> bits, the kernel should provide some way for applications
Andrew> to directly access that stream without the intervening
Andrew> interpretation.

Andrew> Is that a decent summary of the situation?

Yeah. Actually, the external device generates a stream of BYTES, not
bits. Byte is the basic unit. This makes the PS AUX port look like
an RS/232 port from the OS's perspective.


Andrew> If so then yeah, I think the kernel should have a driver
Andrew> which does all of this.

And people can start writing better (more features, with
config. files) userland drivers for their mouse or non-mouse pointing
devices. The drivers only need to take the bytes from
/dev/misc/isa0060/serio* and/or /dev/ttyS1, interpret them, and then
refeed the interpreted events back to the input system via 'uinput'.
Maybe, 'gpm' can be modified to do it. I can't see any more reasons
for writing those drivers in kernel (non-swappable, no memory
protection, etc.) space.

BTW, how about USB mice? Do they export a byte-stream interface?



--
Sau Dan LEE ???(Big5) ~{@nJX6X~}(HZ)

E-mail: danlee@xxxxxxxxxxxxxxxxxxxxxxxxxx
Home page: http://www.informatik.uni-freiburg.de/~danlee

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/