From: Charles D. <cd...@mv...> - 2001-06-24 07:41:49
|
Howdy. I notice that, at present, several of the handlers (such as evdev) assign device numbers independantly. Hence, /dev/input/event2 and /dev/input/mouse2 may not refer to the same device, and (similarly) may not refer to the device dubbed input2 on initialization. Might it not make for a somewhat more user-friendly world to have handlers use dev->number for determining the minor number for each connected device? This would also make a table of connected input devices somewhat more useful. |
From: Vojtech P. <vo...@su...> - 2001-06-27 08:36:24
|
On Sun, Jun 24, 2001 at 12:41:45AM -0700, Charles Duffy wrote: > Howdy. > > I notice that, at present, several of the handlers (such as evdev) > assign device numbers independantly. Hence, /dev/input/event2 and > /dev/input/mouse2 may not refer to the same device, and (similarly) > may not refer to the device dubbed input2 on initialization. > > Might it not make for a somewhat more user-friendly world to have > handlers use dev->number for determining the minor number for each > connected device? > > This would also make a table of connected input devices somewhat more > useful. Sounds reasonable to start searching for free numbers at the dev->number position. What others think? -- Vojtech Pavlik SuSE Labs |
From: James S. <jsi...@tr...> - 2001-06-27 16:52:53
|
> > Howdy. > > > > I notice that, at present, several of the handlers (such as evdev) > > assign device numbers independantly. Hence, /dev/input/event2 and > > /dev/input/mouse2 may not refer to the same device, and (similarly) > > may not refer to the device dubbed input2 on initialization. > > > > Might it not make for a somewhat more user-friendly world to have > > handlers use dev->number for determining the minor number for each > > connected device? > > > > This would also make a table of connected input devices somewhat more > > useful. > > Sounds reasonable to start searching for free numbers at the dev->number > position. What others think? Is it possible to match them up like that? I was thinking about it and to me it seems like a huge task. Unless I miss understood what he suggested. One thing I like to bring up about numbering is when you plug and unplug devices. At present when you unplug a device and plug it back in the device becomes /dev/input/event[n+1]. Where /dev/input/event[n] now has no device attached. There is a limit to 256 event devices. Now you say that is a good number but given 5 input devices it whould take 15 times unplugging and plugging them back in before you run out of numbers. So I like to suggest that we keep track of the "free" numbers and grab the lowest one. Say you have 5 devices and you unplug device 3 and then plug it back it then it should be device 3 again. Not device 6. P.S My iPAQ input touchscreen driver went into the handhelds tree. HaHooooo! Once compaq transfers over I hope to see others transfer over. |
From: Vojtech P. <vo...@su...> - 2001-06-27 21:06:00
|
On Wed, Jun 27, 2001 at 09:52:46AM -0700, James Simmons wrote: > > > > Howdy. > > > > > > I notice that, at present, several of the handlers (such as evdev) > > > assign device numbers independantly. Hence, /dev/input/event2 and > > > /dev/input/mouse2 may not refer to the same device, and (similarly) > > > may not refer to the device dubbed input2 on initialization. > > > > > > Might it not make for a somewhat more user-friendly world to have > > > handlers use dev->number for determining the minor number for each > > > connected device? > > > > > > This would also make a table of connected input devices somewhat more > > > useful. > > > > Sounds reasonable to start searching for free numbers at the dev->number > > position. What others think? > > Is it possible to match them up like that? I was thinking about it and > to me it seems like a huge task. Unless I miss understood what he > suggested. We can't match them completely, but we should be able to make a good approximation if the user doesn't do too nasty things to the system. > One thing I like to bring up about numbering is when you plug and > unplug devices. At present when you unplug a device and plug it back in > the device becomes /dev/input/event[n+1]. Where /dev/input/event[n] now > has no device attached. Only if it is open. If it is not, it'll become /dev/input/event[n] > There is a limit to 256 event devices. Now you > say that is a good number but given 5 input devices it whould take 15 > times unplugging and plugging them back in before you run out of numbers. > So I like to suggest that we keep track of the "free" numbers and grab the > lowest one. We do this, at least in evdev. > Say you have 5 devices and you unplug device 3 and then plug > it back it then it should be device 3 again. Not device 6. -- Vojtech Pavlik SuSE Labs |
From: James S. <jsi...@tr...> - 2001-06-29 19:27:23
|
> > There is a limit to 256 event devices. Now you > > say that is a good number but given 5 input devices it whould take 15 > > times unplugging and plugging them back in before you run out of numbers. > > So I like to suggest that we keep track of the "free" numbers and grab the > > lowest one. > > We do this, at least in evdev. Yes but input.c you just increase it from what I could see. |
From: Vojtech P. <vo...@su...> - 2001-06-30 19:54:06
|
On Fri, Jun 29, 2001 at 12:27:10PM -0700, James Simmons wrote: > > > > There is a limit to 256 event devices. Now you > > > say that is a good number but given 5 input devices it whould take 15 > > > times unplugging and plugging them back in before you run out of numbers. > > > So I like to suggest that we keep track of the "free" numbers and grab the > > > lowest one. > > > > We do this, at least in evdev. > > Yes but input.c you just increase it from what I could see. No: dev->number = find_first_zero_bit(input_devices, INPUT_DEVICES); -- Vojtech Pavlik SuSE Labs |
From: James S. <jsi...@tr...> - 2001-07-01 14:11:24
|
> > Yes but input.c you just increase it from what I could see. > > No: > > dev->number = find_first_zero_bit(input_devices, INPUT_DEVICES); Sorry I was looking at the dev->number = input_number which is always increased and decreased. |