Mailing List archive

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

[linux-dvb] Re: CX88 i2c issue w/ DVB tuners



Hi,

On 12.09.2004 16:08, Andrew de Quincey wrote:
I wouldn't care when kernel i2c would be crappy code inside (which I
thing it isn't)

:) (it is - really: I've rarely seen anything broken-by-concept like

this. And I've rarely seen anybody fighting like a pitbull for such a
stupid concept.)

You seem to have the wrong end of the stick here. I'm only fighting to FIX i2c. I'm saying if we use i2c_transfer() as you suggest, then we have to register an i2c_adapter. If we register an i2c_adapter, it will be autoprobed as the *braindead* i2c stuff doesn't let you turn autoprobing OFF. If it is autoprobed, the _other_ i2c devices (e.g. the tda9887) in the system can stomp on us. The alternative is to stop using kernel i2c.
I think it's easy to stop autoprobing by introducing a new .flags field to struct i2c_adapter, for example #define I2C_ADAP_NO_AUTOPROBE.

It should be possible for an i2c_adapter to tell which i2c_driver it is expecting, ie. it should specify an array of driver ids like I2C_DRIVERID_DVBFE_TDA1004X. This array can even be a member of struct i2c_adapter itself.

Basically i2c_add_driver() and i2c_add_adapter() hold the autoprobing logic. We can check for the new flag and prevent autoprobing for all devices, unless the devices that are present in the whitelist.

Since we can see this problem coming, why not fix it now, instead of waiting for it to bite us in the arse? :)
IMO the fix is in the i2c subsystem. Sure, it's more hard to get changes done in there.

CU
Michael.




Home | Main Index | Thread Index