Mailing List archive

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

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



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.

If we used the same I2C_CLASS_* bitfield as in i2c_adapter, then this could be 
done by a simple AND operation.

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.

And we will need a new i2c function to request an i2c driver by name to 
attempt to attach itself to a given i2c adapter (e.g. i2c_request_driver)

For DVB, the card driver init would work something like as follows:
* initialise board 
* setup i2c adapter with NOPROBE enabled.
* determine which demod to use (from PCIIDS/eeprom etc).
* request_module the appropriate module.
* use i2c_request_driver() to attach the frontend driver to the bus.
* assming that worked, use FE_IDENTIFY to determine the exact frontend, and 
FE_CONFIGURE to set up the frontend with the board-specific configuration.

what do you think?




Home | Main Index | Thread Index