Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Suggestion for autoprobing of i2c devices fix



On Sat, Sep 11, 2004 at 02:30:46PM +0100, Andrew de Quincey wrote:
> Ralph is right I think - i2c_driver should really have an equivalent of the 
> "class" field from i2c_adapter in them - to permit adapters to ignore devices 
> which do not match their class automatically.

Michael Hunold's patch archive should have that already ;)

Also the i2c_drivers can handle that conditionally already _today_,
in attach_adapter they can have a look at the i2c_adapter fields and
decide _not_ to attach if they don't want to.

> To disable autoprobing, I would suggest adding a new flag to the flags in 
> i2c_device - I2C_DF_NOPROBE. If this is set, the driver will not be included 
> in autoprobing scans of buses.

> We will also need a flag in i2c_adapter indicating the same thing - that the 
> adapter should not be autoprobed.

Makes sense to have that as well.

> * request_module the appropriate module.

Thats probably a good idea anyway.  Right now the frontend drivers not
autoloaded at all.  The drivers asking for the correct fe module
automatically (much like analog drivers load tuner/tda9887/msp3400
modules) things will be easier for the users.

> * use i2c_request_driver() to attach the frontend driver to the bus.

Hmm, I somehow dislike that approach.  Don't have a better idea through.
i2c_driver->attach_adapter() would be the more natural place to handle
this, it's kida hard to pass config info from the i2c adapter driver in
that case through as the two are not linked to each other yet ...

  Gerd

-- 
return -ENOSIG;




Home | Main Index | Thread Index