On Tuesday 17 October 2006 9:23 am, Kevin Hilman wrote:

> I think the driver in Linus mainline will not work for probing of chips
> on OMAP either.  

Exactly so.  To use an I2C device you'l need to use the i2c driver
"force" parameter on the command line.


It sucks ... but the fundamental issue is a flaw in the Linux I2C
stack, namely that while the I2C protocol isn't defined as supporting
device probing, the Linux stack assumes that it always works.  So that
every i2c device driver expects probing will work.

How to fix?  I've heard rumors that some folk are working on updating
that I2C stack to support device tables, like the SPI stack.  (Which had
a design goal of not repeating the I2C API botches ...)  But that rumor
has persisted for over a year and I've seen no patches merged upstream.

I've also heard semi-serious suggestions to just clone that SPI stack and
morph the API to suit I2C (e.g. stick to half duplex, rename) to fix that
issue and the equally annoying issues like "every i2c op needs a thread
context" and "no I2C device can issue IRQs".  Presumably something will
get fixed someday.  (There's now an I2C mailing list where such things
would get discussed.)


> Since the OMAP/DaVinci cannot actually do the SMBus quick, is there a
> different way to probe for devices?  It seems that the i2c_probe code
> depends on smbus quick functionality.  Maybe these layers need to be
> converted so that some platform_device code can define the addresses
> instead of using probing.

The I2C stack is really goofy with respect to driver model support,
and such device tables don't exist...

For starters, it's not _devices_ which are probed but _busses_ ... and
that probing isn't done by the i2c bus infrastructure, but by each
different i2c "device" driver.  Add to that the fact that I2C itself
doesn't support probing ... and you see why some people think that a
new I2C stack might be worth the substantial near-term hassles that
a switch would involve.


> Speaking of smbus and smbus quick, since I'm not very familiar with i2c,
> do you have any pointers do docs on them?  Is it true that the hardware
> cannot support them?

Seems to be true of OMAP, yes.  Haven't looked at DaVinci.

I found a copy of the Philips' i2c spec a while back; it seems to no
longer be NDA-only (if it ever was).  Forwarding it to you separately.
There were some websites, maybe smbus.org would be a good start.

- Dave


> Let's discuss how to change the probing mechanism, and then I'll take
> your cleanups.  They'll have to be remerged though because of some the
> TI bugfixes that when in yesterday.
> 
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to