Pixel, are you back?

Problem.

In 2.4 every mouse device have own input driver with own major/minor.
So to configure mouse you just have to point it to correct device name -
it will be autoloaded by CONFIG_KMOD white magic or devfsd. I guess
some people may have never realized it :)

In 2.6 input susbsystem is built of backend drivers that control device,
frontend drivers that receive events from backends and dispatch them
to users and multiplexer - module "input". 

You do not have direct access to hardware anymore. What you can get
for mouse is either /dev/psaux or /dev/input/mouseN that is EMULATED
Microsoft Intellimouse for ANY mouse-like backed available or event
interface /dev/input/eventN.

/dev/input/mouseN or /dev/input/eventN are allocated on-the-fly when
new device is connected; so there is no obvious way to associate them
with specific device unless you have only one device of course. 
Information to do it is available but currently I do not see how
it can be done. udev is helpful ...

We have to solve a problem of maintaining mouse configuration is such
a way that is compatible between 2.4 and 26 and possible - horrors -
2.2. Four problems:

- frontend handlers
- backend drivers
- mouse type
- mouse device

1. handlers is the easiest part they will be loaded by hotplug, depmod
support is ready, input ageent will follow. It will work for 2.4 as
well (it does not have input hotplug type but it will be loaded out
of USB that only is of interest there)

2. backend drivers are likely to be loaded manually for most hardware.
exception is USB. I may write hotplug agent for PnP BIOS to load
i8042 + keyboard/mouse but until then mousedrake should handle it.
Suggested place is simply /etc/modprobe.preload.

3. mouse type is really hard. if we keep specific mouse type for gpm
and X11 for 2.4 we cannot use it in 2.6. Possible solutions are

- use event interface for gpm (it supports it) and use gpm emulated
mouse for X11 (unless it supports event as well). I am using X11 + 
gpm emulated mouse for several months without any problems.

- use different mouse devices and mouse types for 2.4 and 2.6 While
it is easy for gpm (started by script) it is not likely to be feasible
for X11 with static config file so I still suggest using gpm emulated
mouse for it.

4. see 3. The same problem

So to summarize

- handlers are loaded by hotplug, nothing needs be done
- backend drivers should be configured by mousdrake (unless hotpluggable) and 
preloaded manually
- use either event or to different mouse types/mouse devices depeneding
on kernel version for gpm and make it provide FIFO for X11
- use gpm FIFO as mouse device for X11.

comments?

-andrey

Reply via email to