Re: [PATCH 1/3] MFD: introduce lpc_sch for Intel SCH LPC bridge

Jean Delvare
2010-02-16T17:29:51Z

On Tue, 16 Feb 2010 09:19:58 -0800, Pan, Jacob jun wrote:
> >That shouldn't be a problem. The PCI device is still present, so
> >sensors-detect will see it. Then it will load the required driver, and
> >that driver will instantiate i2c adapters. The script then probes all
> >i2c adapters regardless of who created them, so the exact driver
> >implementation doesn't matter.
> >
> [[JPAN]] thanks for explaining it, all made sense to me. looking at
> sensors-detect, it will still load isch driver for the same pci id.
> but how would it know it depends on the new lpc driver to set up resources?
> i can't see shared symbols.
>
> }, {
> vendid => 0x8086,
> devid => 0x8119,
> procid => "Intel SCH",
> driver => "i2c-isch",
> },

On systems with udev, I would expect the mfd driver to load
automatically through module aliases, so this should be OK. Actually,
even i2c-isch should load automatically if we setup proper aliases for
the platform devices it instantiates. For other systems, indeed, the
mfd driver won't load in the absence of a shared symbol. Might be worth
adding request_module() call in platform drivers? If this isn't
acceptable for whatever reason, I can certainly hack sensors-detect to
treat this uncommon case properly, but solving this problem at the
application level seems wrong.

--
Jean Delvare