From: Andrey Borzenkov <arvidjaar@mail.ru>
To: DervishD <raul@pleyades.net>
Cc: Shawn Willden <shawn-lkml@willden.org>, linux-kernel@vger.kernel.org
Subject: Re: /dev/input/mice doesn't work in test9?
Date: Sun, 2 Nov 2003 13:12:15 +0300 [thread overview]
Message-ID: <200311021312.15902.arvidjaar@mail.ru> (raw)
In-Reply-To: <20031101205646.GB9129@DervishD>
On Saturday 01 November 2003 23:56, DervishD wrote:
[...]
>
> My problem is a bit different. I'm using 2.4.21, with an USB
> mouse. I have 'input' built-in, and hid and mousedev as modules.
> Well, if I do a cat /dev/mouse (c 13 32) or /dev/mice (c 13 63), I
> always get ENODEV, unless I manually load hid and mousedev. The logs
> doesn't say anything like 'cannot find driver for char-major-13' or
> whatever. It just seems that 'mousedev' is never autoloaded :?
>
Well, major 13 is for all input devices not for mousedev alone. 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.
You may add explicit per-minor autoloading to input.c, see
drivers/input/input.c:input_open_file()
> > The whole input subsystem has changed between 2.4 and 2.6.
> > Unfortunately, input sysbsystem hotplugging is not currently
> > implemented. Your best bet is to forcibly load mousedev during
> > boot.
>
> But hotplugging is for connecting and disconnecting devices, not
> for autoloading modules. I mean, if I access any char-major-13, and
> the corresponding modules is not loaded, it should autoload :?
>
> 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.
> > Alternatively look into hotplug for usermap, it allows provide fake
> > mapping for modules - you could add mapping from UDB IDs of oyur
> > mouse to mousedev. Loading it statically is likely to be more
> > simple.
>
which is of course already available in hotplug, sorry for confusion.
> 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.
Hid will never be autoloaded (without manual configuration) on access to
mousedev because they are independent. Mousedev provides use interface to any
mouse, not just USB mouse handled by HID. Mousedev has no way to know what
hardware is connected until driver for it has registered with input layer. So
hid should be loaded when mouse is detected (i.e. by hotplug) or manually if
you always know you have USB mouse. Building it in kernel is the easiest way
to ensure it is always available.
-andrey
next prev parent reply other threads:[~2003-11-02 10:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-31 8:03 /dev/input/mice doesn't work in test9? "Andrey Borzenkov"
2003-10-31 14:27 ` Shawn Willden
2003-11-01 20:56 ` DervishD
2003-11-02 10:12 ` Andrey Borzenkov [this message]
2003-11-02 12:08 ` DervishD
2003-11-02 17:45 ` Andrey Borzenkov
2003-11-02 20:37 ` DervishD
-- strict thread matches above, loose matches on Subject: below --
2003-10-30 18:32 Shawn Willden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200311021312.15902.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=raul@pleyades.net \
--cc=shawn-lkml@willden.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox