* [PATCH] i2c: i2c-imx: Use -ENXIO as error in the NACK case
@ 2015-10-22 16:41 Fabio Estevam
2015-10-23 20:27 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2015-10-22 16:41 UTC (permalink / raw)
To: wsa; +Cc: linux-i2c, Fabio Estevam
According to Documentation/i2c/fault-codes the response to a bus NACK
should be -ENXIO, so fix the error code.
This change is similar to commit 6ff4b1051632 ("i2c: rcar: fix NACK
error code").
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/i2c/busses/i2c-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 785aa67..329cf13 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -461,7 +461,7 @@ static int i2c_imx_acked(struct imx_i2c_struct *i2c_imx)
{
if (imx_i2c_read_reg(i2c_imx, IMX_I2C_I2SR) & I2SR_RXAK) {
dev_dbg(&i2c_imx->adapter.dev, "<%s> No ACK\n", __func__);
- return -EIO; /* No ACK */
+ return -ENXIO; /* No ACK */
}
dev_dbg(&i2c_imx->adapter.dev, "<%s> ACK received\n", __func__);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-23 20:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-22 16:41 [PATCH] i2c: i2c-imx: Use -ENXIO as error in the NACK case Fabio Estevam
2015-10-23 20:27 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).