LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Greg KH <greg@kroah.com>
Cc: i2c@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: Why to I2c drivers not autoload like other PCI devices?
Date: Wed, 3 Jan 2007 17:29:16 -0800	[thread overview]
Message-ID: <20070103172916.7f9ca11a@freekitty> (raw)
In-Reply-To: <20070104005600.GA25712@kroah.com>

On Wed, 3 Jan 2007 16:56:00 -0800
Greg KH <greg@kroah.com> wrote:

> On Wed, Jan 03, 2007 at 04:50:20PM -0800, Stephen Hemminger wrote:
> > Is there some missing magic (udev rule?) that keeps i2c device modules
> > from loading? For example: the Intel i2c-i801 module ought to get loaded
> > automatically on boot up since it has a set of PCI id's that generate
> > the necessary module aliases. It would be better if I2C device's autoloaded
> > like other PCI devices.
> 
> No, it should autoload, if it has a MODULE_DEVICE_TABLE() in it.  In
> fact, the i2c-i801 autoloads on one of my machines just fine.  Are you
> sure your pci ids match properly?
> 
> thanks,
> 
> greg k-h

This laptop is running Ubuntu Edgy (6.10) and it doesn't autoload.
Everything works fine if I manually load the module with modprobe.

This device should match:

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
00: 86 80 da 27 01 00 80 02 02 00 05 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: a1 18 00 00 00 00 00 00 00 00 00 00 cf 10 88 13
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 02 00 00

This driver modinfo:

filename:       /lib/modules/2.6.20-rc3/kernel/drivers/i2c/busses/i2c-i801.ko
author:         Frodo Looijaard <frodol@dds.nl>, Philip Edelbrock <phil@netroedge.com>, and Mark D. Studebaker <mdsxyz123@yahoo.com>
description:    I801 SMBus driver
license:        GPL
vermagic:       2.6.20-rc3 mod_unload PENTIUMM 4KSTACKS 
depends:        i2c-core
alias:          pci:v00008086d00002413sv*sd*bc*sc*i*
alias:          pci:v00008086d00002423sv*sd*bc*sc*i*
alias:          pci:v00008086d00002443sv*sd*bc*sc*i*
alias:          pci:v00008086d00002483sv*sd*bc*sc*i*
alias:          pci:v00008086d000024C3sv*sd*bc*sc*i*
alias:          pci:v00008086d000024D3sv*sd*bc*sc*i*
alias:          pci:v00008086d000025A4sv*sd*bc*sc*i*
alias:          pci:v00008086d0000266Asv*sd*bc*sc*i*
alias:          pci:v00008086d000027DAsv*sd*bc*sc*i*       <------- should match
alias:          pci:v00008086d0000269Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000283Esv*sd*bc*sc*i*
alias:          pci:v00008086d00002930sv*sd*bc*sc*i*

Table in drivers/i2c/busses/i2c-i801.c

static struct pci_device_id i801_ids[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_3) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_3) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_2) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_3) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_3) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_3) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_4) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_16) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_17) },                <------ should match
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_17) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_5) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_6) },
	{ 0, }
};

MODULE_DEVICE_TABLE (pci, i801_ids);




-- 
Stephen Hemminger <shemminger@osdl.org>

  reply	other threads:[~2007-01-04  1:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-04  0:50 Stephen Hemminger
2007-01-04  0:56 ` Greg KH
2007-01-04  1:29   ` Stephen Hemminger [this message]
2007-01-04  5:51     ` Greg KH
2007-01-04 16:54       ` [i2c] " Jean Delvare
2007-01-04 17:54         ` Stephen Hemminger
2007-01-04 19:32           ` Greg KH
2007-01-04 20:47             ` Jean Delvare

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=20070103172916.7f9ca11a@freekitty \
    --to=shemminger@osdl.org \
    --cc=greg@kroah.com \
    --cc=i2c@lm-sensors.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: Why to I2c drivers not autoload like other PCI devices?' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).