From: Reid Tonking <reidt@ti.com>
To: <tony@atomide.com>, <vigneshr@ti.com>, <aaro.koskinen@iki.fi>,
<jmkrzyszt@gmail.com>
Cc: <linux-omap@vger.kernel.org>, <linux-i2c@vger.kernel.org>,
Reid Tonking <reidt@ti.com>
Subject: [PATCH] i2c: omap: Fix standard mode false ACK readings
Date: Mon, 24 Apr 2023 14:53:44 -0500 [thread overview]
Message-ID: <20230424195344.627861-1-reidt@ti.com> (raw)
Using standard mode, rare false ACK responses were appearing with
i2cdetect tool. This was happening due to NACK interrupt triggering
ISR thread before register access interrupt was ready. Removing the
NACK interrupt's ability to trigger ISR thread lets register access
ready interrupt do this instead.
Fixes: 3b2f8f82dad7 ("i2c: omap: switch to threaded IRQ support")
Signed-off-by: Reid Tonking <reidt@ti.com>
---
Fixes: LCPD-29949
drivers/i2c/busses/i2c-omap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index f9ae520aed22..7ec252199706 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1058,7 +1058,7 @@ omap_i2c_isr(int irq, void *dev_id)
u16 stat;
stat = omap_i2c_read_reg(omap, OMAP_I2C_STAT_REG);
- mask = omap_i2c_read_reg(omap, OMAP_I2C_IE_REG);
+ mask = omap_i2c_read_reg(omap, OMAP_I2C_IE_REG) & ~OMAP_I2C_STAT_NACK;
if (stat & mask)
ret = IRQ_WAKE_THREAD;
--
2.34.1
next reply other threads:[~2023-04-24 19:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 19:53 Reid Tonking [this message]
2023-04-25 12:45 ` [PATCH] i2c: omap: Fix standard mode false ACK readings Andi Shyti
[not found] ` <20230425145610.j3ljepycclr3i42t@reidt-t5600.dhcp.ti.com>
2023-04-25 15:51 ` Reid Tonking
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=20230424195344.627861-1-reidt@ti.com \
--to=reidt@ti.com \
--cc=aaro.koskinen@iki.fi \
--cc=jmkrzyszt@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=vigneshr@ti.com \
/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