Re: 2.6 input drivers FAQ

Vojtech Pavlik
2004-02-02T09:35:31Z

On Sun, Feb 01, 2004 at 04:14:52PM +0100, Andries Brouwer wrote:

> > One more question: Will kbdrate work properly (use ioctls) when compiled
> > on a 2.6 kernels?
>
> kbdrate first tries the KDKBDREP ioctl, then the KIOCSRATE ioctl,
> and if both fail it will try to write to /dev/port.

Could you disable accessing /dev/port if running on a 2.6 kernel?

If the controller is in MUX mode it can disturb it rather badly. It's
wrong anyway, because if the user has an USB keyboard, and in the case
of a legacyless system it'll even try to access nonexisting hardware.

The problem is that when you're in X, and root, the ioctls will fail,
but /dev/port will still work, and cause trouble.

I'd even vote in favor of ditching the /dev/port code completely,
because all reasonable kernels support the ioctls, but that's your call.

----

Btw, what would you think about having the setkeycodes and kbdrate (and
possibly some other tools, too) take an optional argument of
/dev/input/event#, and then use the EVIOCSKEYCODE ioctl and EV_REP write
to set the scancodes and repeat on that single device? It'd be very
useful if one has more than one keyboard in the system.

--
Vojtech Pavlik
SuSE Labs, SuSE CR