From: Fabio Estevam <fabio.estevam@freescale.com>
To: wsa@the-dreams.de
Cc: linux-i2c@vger.kernel.org, Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH] i2c: i2c-imx: Use -ENXIO as error in the NACK case
Date: Thu, 22 Oct 2015 14:41:20 -0200 [thread overview]
Message-ID: <1445532080-30724-1-git-send-email-fabio.estevam@freescale.com> (raw)
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
next reply other threads:[~2015-10-22 16:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 16:41 Fabio Estevam [this message]
2015-10-23 20:27 ` [PATCH] i2c: i2c-imx: Use -ENXIO as error in the NACK case Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445532080-30724-1-git-send-email-fabio.estevam@freescale.com \
--to=fabio.estevam@freescale.com \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).