[PATCH 0/3]: Sparc OF I2C support.
    Scott Wood 
    scottwood at freescale.com
       
    Fri Aug 22 02:32:56 EST 2008
    
    
  
On Thu, Aug 21, 2008 at 12:10:12AM -0700, David Miller wrote:
> Mostly straightforward stuff _except_ for the I2C address encoding.
> 
> What I2C IEEE1275 device binding was used to write that code in
> of_i2c.c?  Is it some PowerPC specific thing?  Was it "invented"
> by the embedded folks (I hope not)?
Yes, it was "invented".  There was no documented i2c OF binding that I
could find, and AFAIR nobody came forward with examples of existing
practice at the time.
> And, furthermore, the device address is shifted up 1 bit higher
> than the Linux I2C layer expects.  It includes the low direction
> bit, bit 0, so we have to shift it down by 1 bit before we give
> it to the Linux I2C layer.
Yuck.
> 2) When CONFIG_SPARC, shift the device address down by one bit before
>    giving it to the Linux I2C layer.
Maybe we should distinguish by the type of I2C bus node instead.
-Scott
    
    
More information about the Linuxppc-dev
mailing list