From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S271813AbTHHTfM (ORCPT ); Fri, 8 Aug 2003 15:35:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S271812AbTHHTet (ORCPT ); Fri, 8 Aug 2003 15:34:49 -0400 Received: from dp.samba.org ([66.70.73.150]:39888 "EHLO lists.samba.org") by vger.kernel.org with ESMTP id S271811AbTHHTel (ORCPT ); Fri, 8 Aug 2003 15:34:41 -0400 From: Rusty Russell To: Andrey Borzenkov Cc: greg@kroah.com, linux-kernel@vger.kernel.org Subject: Re: module-init-tools - input devices id support In-reply-to: Your message of "Sat, 02 Aug 2003 20:26:08 +0400." <200308022026.08906.arvidjaar@mail.ru> Date: Sat, 09 Aug 2003 03:20:01 +1000 Message-Id: <20030808193441.510142C252@lists.samba.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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.