[PATCH 01/14] i2c: jz4780: suppress txabrt reports for i2cdetect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This suppresses "simple" error reasons

	ABRT_7B_ADDR_NOACK
	ABRT_10ADDR1_NOACK
	ABRT_10ADDR2_NOACK

from flooding the console log when running i2cdetect on
addresses without a responding slave.

Additionally, reading the JZ4780_I2C_TAR in this situation
seems to harm the controller state.

Signed-off-by: H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>
---
 drivers/i2c/busses/i2c-jz4780.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c
index 16a67a64284a..55b7518435f1 100644
--- a/drivers/i2c/busses/i2c-jz4780.c
+++ b/drivers/i2c/busses/i2c-jz4780.c
@@ -578,6 +578,9 @@ static void jz4780_i2c_txabrt(struct jz4780_i2c *i2c, int src)
 {
 	int i;
 
+	if (!(src & ~7))
+		return;
+
 	dev_err(&i2c->adap.dev, "txabrt: 0x%08x\n", src);
 	dev_err(&i2c->adap.dev, "device addr=%x\n",
 		jz4780_i2c_readw(i2c, JZ4780_I2C_TAR));
-- 
2.23.0




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux