From: Vojtech P. <vo...@su...> - 2001-06-22 12:26:45
|
On Tue, Jun 19, 2001 at 03:48:01PM -0700, James Simmons wrote: > > > > Is this a seperate patch or the patch from Charles? I looked at his patch > > > and it has only one line change in input.c. Very nice patch. After I'm > > > done with power management today I will incorporate it. Probable some > > > time tomorrow unless Vojtech has any objections. > > > > Last time I asked Vojtech wasn't very pleased of that idea, eg. it doesn't > > make much sense to mix in EV_ABS devices. > > Your right. I have this problem with a userland program I wrote. The way > I got around that was to emulate each absolute device as a relative > device. > > > Maybe it should be a separate module providing a whole class of event mix > > devices, with all EV_KEY and EV_REL mixed on /dev/eventmix0 by default. Then > > there could be ioctl's to attach and detach single event devices onto the > > mixer devices. > > The real underlying problem is knowing when a device gets attached and > detached. USB currently handles this with a select() on /proc/bus/usb/devices. I think we could do the same. Actually a /proc/..../input/devices file would be quite useful. As for detaching, evdev now returns -ENODEV on read() when a device is detached. > How do we know that? It is not easy to solve. A mixer sort of > gets around this problem. Then we run into the problem of EV_ABS type > devices. The mixer device could be used to tell us when a new device is > added or subtracted. Then we can decided to add the new device to the > mixer. -- Vojtech Pavlik SuSE Labs |