Re: /dev/input/mice doesn't work in test9?
Date: Sun Nov 02 2003 - 07:09:49 EST
Hi Andrey :)
Thanks for answering :)
* Andrey Borzenkov <arvidjaar@xxxxxxx> dixit:
> > whatever. It just seems that 'mousedev' is never autoloaded :?
> Well, major 13 is for all input devices not for mousedev alone.
I know, but I just use it for mousedev O:)
> You have input built-in which means there is no reason for kernel
> to try autoload driver for char-13 as it is already available.
But not char-major-13-32, for example.
> You may add explicit per-minor autoloading to input.c, see
But that code works with the 'input_table', and the
input_handlers. The handlers are registered by the modules when they
are already loaded. Do you mean that I should modify input_open_file
in order to autoload the appropriate module in the case of the
handler not being present? Currently input_open_file just returns
ENODEV in that case, but I don't know how to request for autoloading
O:) In fact, if Vojtech hasn't already done that surely there is a
very good reason not to do it... I prefer not modify the kernel for
that. If the only solution is making mousedev and hid built-in
instead of modules, I can do it.
> > The rest of devices in my system are properly autoloaded on
> > demand, but hid and mousedev are not :( Am I doing something wrong?
> no. Loading on demand simply is not supported.
> If you are using hotplug, both should be loaded by hotplug. IMHO it is also
> the right way to go.
The problem is that hotplug doesn't work for me in this case. I
mean, with hotplug in *this particular case*, since the mouse is
always connected, the modules will be loaded on bootup and unloaded
on shutdown, not when the mouse device is opened and closed,
I've tested with hotplug (well, I don't have hotplug utilities
installed, just a shell script that tells me if someone is calling
/sbin/hotplug and logs the parameters), and /sbin/hotplug is not
called when I try to open /dev/mouse (c 13 32).
> > Exactly... Anyway, if I build 'mousedev' into my kernel instead
> > of making it a module, should I do the same with 'hid' or
> > char-major-13 *is* autoloaded?
> char-major-13 is 'input'. Period. It is not mousedev or whatever. For this
> reason it must implement its own autoloading if desired. Cf. misc driver.
My excuses O:) I was refering to char-major-13-32 (or -64, is
just the same for me).
> Hid will never be autoloaded (without manual configuration) on access to
> mousedev because they are independent.
Yes, I knew that. It is loaded by hotplug or by hand (or even
with 'above' or 'below' when another module is autoloaded, I
> Building it in kernel is the easiest way to ensure it is always available.
Yes, I'm going to build in hid, but, should I do the same with
mousedev (or event, joystick, etc...) or will it work with hid loaded
when doing 'cat /dev/mouse'?
Thanks a lot for your help :))
Raúl Núñez de Arenas Coronado
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
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/