[PATCH][2.6]

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

 



Hello,

in the "[RFC|PATCH][2.6] Additional i2c adapter flags for i2c client 
isolation" thread, the i2c people have  agreed that an ".class" field 
should be added to struct i2c_driver.

Currently only drivers do checks for plausibility ("Is this an adapter I 
can attach to?"), but adapters don't have a chance to keep drivers away 
from their bus.

If both drivers and adapters provide a .class entry, the i2c-core can 
easily compare them and let devices only probe on busses where they can 
really exist.

Real world example: DVB i2c adapters cannot ensure that only known DVB 
i2c chipsets probe their busses. Most client drivers probe every bus 
they get their hands on. This will confuse some DVB i2c busses.

With the new I2C_CLASS_ALL flag it will be possible that an adapter can 
request that really all drivers are probed on the adapter. On the other 
hand, drivers can make sure that they get the chance to probe on every 
i2c adapter out there (this is not encouraged, though)

The attached patch does the first step:
- add .class member to struct i2c_device
- remove unused .flags member from struct i2c_adapter
- rename I2C_ADAP_CLASS_xxx to I2C_CLASS_xxx (to be used both for 
drivers and adapters)
- add new I2C_CLASS_ALL and I2C_CLASS_SOUND classes
- follow these changes in the existing drivers with copy & paste

I think these things are unquestionable and don't make any functional 
changes to the code, so this should be applied to 2.6 now.

 From that point on, we can discuss how to proceed.

Comments?

CU
Michael.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-adapter-client-isolation.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040505/65eddd6a/attachment.pl 


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux