Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755325AbYANRI0 (ORCPT ); Mon, 14 Jan 2008 12:08:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752092AbYANRIT (ORCPT ); Mon, 14 Jan 2008 12:08:19 -0500 Received: from vervifontaine.sonytel.be ([80.88.33.193]:39197 "EHLO vervifontaine.sonycom.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751363AbYANRIS (ORCPT ); Mon, 14 Jan 2008 12:08:18 -0500 Date: Mon, 14 Jan 2008 18:08:16 +0100 (CET) From: Geert Uytterhoeven To: Jean Delvare cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, i2c@lm-sensors.org Subject: Re: [i2c] [PATCH] update module-init-tools to support the i2c subsystem In-Reply-To: <20080114173835.5fe907db@hyperion.delvare> Message-ID: 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> <20080114173835.5fe907db@hyperion.delvare> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-584349381-1183529181-1200329614=:3058" Content-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3094 Lines: 78 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---584349381-1183529181-1200329614=:3058 Content-Type: TEXT/PLAIN; CHARSET=UTF-8 Content-Transfer-Encoding: 8BIT Content-ID: On Mon, 14 Jan 2008, Jean Delvare wrote: > 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 Sorry, you're right. Too early in the morning :-) > to module-init-tools, and "modinfo" shows me module aliases properly > for i2c drivers that call MODULE_DEVICE_TABLE(): I've just looked it up again (I had to do a similar thing for Zorro bus support). Module-init-tools (depmod) also creates the modules.*map files, which are used to map from device IDs to module names. I think these are used by udev to load the appropriate module when a device with a specific device ID pops up in sysfs. > $ /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. Yes, it's also still not 100% clear to me when `i2c:Nadm1032' is used, and when modules.i2cmap would be used... With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: Geert.Uytterhoeven@sonycom.com Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 ---584349381-1183529181-1200329614=:3058-- -- 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/