[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170518141450.30938-1-michael.thalmeier@hale.at>
Date: Thu, 18 May 2017 16:14:50 +0200
From: Michael Thalmeier <michael.thalmeier@...e.at>
To: Wolfram Sang <wsa@...-dreams.de>
Cc: linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
Marek Vasut <marex@...x.de>, michael@...lmeier.at
Subject: [PATCH] i2c: mxs: dont print error on NAK
When mxs_i2c_pio_wait_xfer_end returns with a return code of -ENXIO, the
NO_SLAVE_ACK_IRQ bit is set in CTRL1.
In this case, do not print an error message, because every NAK would
otherwise generate a new message.
Signed-off-by: Michael Thalmeier <michael.thalmeier@...e.at>
---
drivers/i2c/busses/i2c-mxs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 5738556..e2dbb9c 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -527,7 +527,7 @@ static int mxs_i2c_pio_setup_xfer(struct i2c_adapter *adap,
/* Wait for the end of the transfer. */
ret = mxs_i2c_pio_wait_xfer_end(i2c);
- if (ret) {
+ if (ret && ret != -ENXIO) {
dev_err(i2c->dev,
"PIO: Failed to finish WRITE cmd!\n");
break;
--
2.9.2
Powered by blists - more mailing lists