From: "Janusz Użycki" <j.uzycki-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
Subject: [PATCH 2/2] i2c-mxs: fixed PIO NACK error instead of timeout
Date: Mon, 08 Sep 2014 20:06:12 +0200 [thread overview]
Message-ID: <540DF014.5000508@elproma.com.pl> (raw)
In-Reply-To: <540DEFA6.9030600-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
Subject: [PATCH 2/2] i2c-mxs: fixed PIO NACK error instead of timeout
(1000ms)
i2cdetect scanned i2c bus very slow if address was not occupied by any
device.
Signed-off-by: Janusz Uzycki <j.uzycki-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
---
linux-3.14.17/drivers/i2c/busses/i2c-mxs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-3.14.17/drivers/i2c/busses/i2c-mxs.c
b/linux-3.14.17/drivers/i2c/busses/i2c-mxs.c
index 87ee72d..b498708 100644
--- a/linux-3.14.17/drivers/i2c/busses/i2c-mxs.c
+++ b/linux-3.14.17/drivers/i2c/busses/i2c-mxs.c
@@ -307,6 +307,9 @@ static int mxs_i2c_pio_wait_xfer_end(struct
mxs_i2c_dev *i2c)
unsigned long timeout = jiffies + msecs_to_jiffies(1000);
while (readl(i2c->regs + MXS_I2C_CTRL0) & MXS_I2C_CTRL0_RUN) {
+ /*int ret = mxs_i2c_pio_check_error_state(i2c);*/
+ if (readl(i2c->regs + MXS_I2C_CTRL1) &
MXS_I2C_CTRL1_NO_SLAVE_ACK_IRQ)
+ return -ENXIO;
if (time_after(jiffies, timeout))
return -ETIMEDOUT;
cond_resched();
--
1.7.11.3
next prev parent reply other threads:[~2014-09-08 18:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-08 18:04 [PATCH 1/2] i2c-mxs: debug error message: second SELECT -> READ Janusz Użycki
[not found] ` <540DEFA6.9030600-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-08 18:06 ` Janusz Użycki [this message]
[not found] ` <540DF014.5000508-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-08 18:33 ` [PATCH 2/2] i2c-mxs: fixed PIO NACK error instead of timeout Marek Vasut
[not found] ` <201409082033.58959.marex-ynQEQJNshbs@public.gmane.org>
2014-09-09 9:27 ` Janusz Użycki
[not found] ` <540EC808.6060407-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-09 12:48 ` Marek Vasut
[not found] ` <201409091448.40115.marex-ynQEQJNshbs@public.gmane.org>
2014-09-09 13:10 ` Janusz Użycki
[not found] ` <540EFC41.9070106-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-09 13:59 ` Marek Vasut
[not found] ` <201409091559.24900.marex-ynQEQJNshbs@public.gmane.org>
2014-09-09 15:05 ` Janusz Użycki
[not found] ` <540F1734.6090700-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-09 18:59 ` Marek Vasut
2014-09-08 18:14 ` [PATCH 1/2] i2c-mxs: debug error message: second SELECT -> READ Marek Vasut
[not found] ` <201409082014.07749.marex-ynQEQJNshbs@public.gmane.org>
2014-09-09 8:16 ` [PATCH 1/2] i2c-mxs: fixed error message in pio transfer Janusz Użycki
[not found] ` <540EB762.8090509-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-09 12:36 ` Marek Vasut
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=540DF014.5000508@elproma.com.pl \
--to=j.uzycki-9tnw74q4ehahkko6lodcog@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marex-ynQEQJNshbs@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.