i2c: algo-pca: Add 0x78 as SCL stuck low status for PCA9665
[ Upstream commitcd217f2300
] The PCA9665 datasheet says that I2CSTA = 78h indicates that SCL is stuck low, this differs to the PCA9564 which uses 90h for this indication. Treat either 0x78 or 0x90 as an indication that the SCL line is stuck. Based on looking through the PCA9564 and PCA9665 datasheets this should be safe for both chips. The PCA9564 should not return 0x78 for any valid state and the PCA9665 should not return 0x90. Fixes:eff9ec95ef
("i2c-algo-pca: Add PCA9665 support") Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a632f91f7a
commit
b460fc9d05
|
@ -314,7 +314,8 @@ static int pca_xfer(struct i2c_adapter *i2c_adap,
|
|||
DEB2("BUS ERROR - SDA Stuck low\n");
|
||||
pca_reset(adap);
|
||||
goto out;
|
||||
case 0x90: /* Bus error - SCL stuck low */
|
||||
case 0x78: /* Bus error - SCL stuck low (PCA9665) */
|
||||
case 0x90: /* Bus error - SCL stuck low (PCA9564) */
|
||||
DEB2("BUS ERROR - SCL Stuck low\n");
|
||||
pca_reset(adap);
|
||||
goto out;
|
||||
|
|
Loading…
Reference in New Issue