]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mfd: Fix 88pm860x test bank i2c interface bug
authorJett.Zhou <jtzhou@marvell.com>
Fri, 11 Nov 2011 07:38:26 +0000 (15:38 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 8 Jan 2012 23:37:30 +0000 (00:37 +0100)
commit5bdf7411bc2329cfe015ba6dcf59531e0c6891b8
treede63284df29fb92001b4f75b1827c6b00920bbec
parent289aabdaf943f3676a16908e2c3cc1a1f9877ccb
mfd: Fix 88pm860x test bank i2c interface bug

There are two banks in 88pm8607. One is the normal bank, and the other
one is the test bank, it means it have the same register address in the
normal bank and test bank seperately.
For test bank register, it needs a special I2C sequence to acess as below,
    Touching to 0xFA address
    Touching to 0xFB address
    Touching to 0xFF address
    Accessing bank register
    Touching to 0xFE address
    Touching to 0xFC address
This sequence can't be interrupted. It means that we can't use
i2c_transfef() to implement touching 0xFA address. Otherwise, other i2c
operation may be inserted into 0xFA and 0xFB operation since the lock of
i2c_adapter is already released.
So for test bank we implemented specific i2c read/write operation;

Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/88pm860x-i2c.c