Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753551AbYANQir (ORCPT ); Mon, 14 Jan 2008 11:38:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750796AbYANQik (ORCPT ); Mon, 14 Jan 2008 11:38:40 -0500 Received: from smtp-107-backup.nerim.net ([62.4.16.107]:49229 "EHLO kraid.nerim.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750982AbYANQij (ORCPT ); Mon, 14 Jan 2008 11:38:39 -0500 Date: Mon, 14 Jan 2008 17:38:35 +0100 From: Jean Delvare To: Geert Uytterhoeven Cc: Jon Smirl , linuxppc-dev@ozlabs.org, i2c@lm-sensors.org, linux-kernel@vger.kernel.org Subject: Re: [i2c] [PATCH] update module-init-tools to support the i2c subsystem Message-ID: <20080114173835.5fe907db@hyperion.delvare> In-Reply-To: References: <9e4733910712171839h214e0bc3q179266c86e5987b1@mail.gmail.com> <20080113152735.5dca46a1@hyperion.delvare> <9e4733910801130714m1be16826jf240171972324d16@mail.gmail.com> <20080113163543.16e3d26b@hyperion.delvare> <9e4733910801130826l799e4897pe7380ccb973b5fd0@mail.gmail.com> <20080113184337.5d4cd546@hyperion.delvare> <9e4733910801131004i669276e2pde04b195dd10bd90@mail.gmail.com> X-Mailer: Sylpheed-Claws 2.5.5 (GTK+ 2.10.6; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2089 Lines: 52 Hi Geert, On Mon, 14 Jan 2008 11:57:52 +0100 (CET), Geert Uytterhoeven wrote: > On Sun, 13 Jan 2008, Jon Smirl wrote: > > I don't know exactly what those modules tables are used for. I just > > copied what the other subsystems do. Maybe they are used when you make > > an initrd to know which drivers to copy into the image. > > Module-init-tools needs those table to create module aliases in the *.ko > files from the MODULE_DEVICE_TABLE(), so udev can load the modules based > on the device IDs when the devices appear in sysfs. I thought that the module aliases were generated by scripts/mod/modpost? As a matter of fact, I did not apply Jon's patch to module-init-tools, and "modinfo" shows me module aliases properly for i2c drivers that call MODULE_DEVICE_TABLE(): $ /sbin/modinfo lm90 filename: /lib/modules/2.6.24-rc7-git4/kernel/drivers/hwmon/lm90.ko author: Jean Delvare description: LM90/ADM1032 driver license: GPL vermagic: 2.6.24-rc7-git4 mod_unload depends: hwmon alias: i2c:Nlm90* alias: i2c:Nadm1032* alias: i2c:Nlm99* alias: i2c:Nlm86* alias: i2c:Nmax6657* alias: i2c:Nadt7461* alias: i2c:Nmax6680* $ "modprobe i2c:Nadm1032" loads the lm90 driver as expected. > That's the generic part. How this applies to i2c devices on platforms > without Open Firmware device trees is another question. I guess that's > where Jean gets confused (i2c_device_id got _removed_ last year, > because it didn't make sense (at the time?)). The way it was implemented back then did not make sense. As it was not clear whether we would implement something different or nothing at all, I decided to plain remove it. Now that it seems that we want to implement it differently, I'm looking into it again. -- Jean Delvare -- 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/