lkml.org 
[lkml]   [2003]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: module-init-tools - input devices id support
Date
In message <200308022026.08906.arvidjaar@mail.ru> you write:
> On Saturday 02 August 2003 03:13, Rusty Russell wrote:
> > Hi Andrey,
> >
> > For 2.6 you should not be using the maps generated by depmod.
> > You should be adding to scripts/file2alias.c, and using those aliases
> > to insert modules. This is much more flexible.
>
> well ... file2alias assumes scalar fields with "is equal" or "do not care"
> values. Input handler matching requires bit (sub-)fields matching (with
> longest filed being 512 bits). I od not see how it can be implemented using
> standard alias syntax.

Sorry for the slow response; am on holidays.

I'm confused. This is the first time I've looked at the input code,
so please bear with me.

So, you hotplug in a device that has a suspend key, and you want the
power.ko module to match it? Hmm, cool.

How about a mneumonic for each type? Like so for
drivers/input/power.c:

/* B: bus, V: Vendor, P: Product, R: Version.
* E: evbit, K: keybit, A: absbit, M: mscbit, L: ledbit,
* S: sndbit, F: ffbit. */
/*
input:B*V*P*R*E*key*K*suspend*A*M*L*S*F*
input:B*V*P*R*E*key*K*power*A*M*L*S*F*
input:B*V*P*R*E*K*power*A*M*L*S*F*

You could use "p" instead of power, but the full names are probably
better since they are clear and most drivers only seem to have a
handful from my casual grepping.

> This syntax fails even for some PCI entries already
> (while using pcimap allows for more elaborate matching)

Not in practice, at least so I was assured by Greg. Do you know of a
counter example?

I really prefer generating aliases to hold this meta-information where
possible, because it's so simple for anyone to use them.

> Can you name some current users of module.alias?

Well, noone uses it directly: it's an internal detail of modprobe.
But it's designed for the hotplug stuff. I'll eventually get around
to converting them if Greg doesn't first, because sooner or later
those map files are going to break.

Hope that clarifies!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.104 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site