[i2c] linux-i2c and smbalert
post at hendrik-sattler.de
Tue Sep 12 16:03:09 CEST 2006
Am Dienstag 12 September 2006 14:32 schrieb Mark M. Hoffman:
> * Hendrik Sattler <post at hendrik-sattler.de> [2006-09-11 16:22:46 +0200]:
> > I reqrote the most part of it. i2c-smbalert now registers as i2c_driver
> > and has to be manually attached to the bus by the i2c_adapter driver that
> > want to support it.
> > I also attached the implementation for i2c-i801 (also contains some other
> > cleanups) that runs fine on my system (Intel Corporation 82801BA/BAM
> > SMBus)
> I only had time to quickly glance at this. I would like to review it very
> closely, but that may need to wait a bit.
Ok, I already saw a small flaw in smbalert.patch, having a chunk that only
adds an empty line.
> AFAICT: you still have a race condition between the time you release the
> core lists lock and increment the client use count.
You mean protecting the code in i2c_use_client()?
> And speaking generally, it seems to me there is some logic in i2c-i801 that
> could be moved to i2c-core.
I don't see that. Not every bus adapter driver may want to use the polling
approach (e.g. those with working interrupt support). And all the other stuff
is specific to i2c-i801.
If you meant attaching the i2c_smbus_alert driver to the bus: how to you want
to reliably differ between I2C and SMBus adapters?
PS: I also realised a design flaw in some other driver combination:
the i810 framebuffer driver implements its own i2c adapter driver although
i2c-i810 is available. Actually, it adds 3(!) i2c_adapters and probing those
is pretty slow. But that's an unrelated matter :)
More information about the i2c