linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] i2c: tegra: remove dead code
@ 2020-07-23 12:18 Krishna Yarlagadda
  2020-07-23 12:18 ` [PATCH 2/7] i2c: tegra: Fix setting of controller ID Krishna Yarlagadda
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Krishna Yarlagadda @ 2020-07-23 12:18 UTC (permalink / raw)
  To: digetx-Re5JQEeQqe8AvxtiuMwx3w, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: jonathanh-DDmLM1+adcrQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA,
	smohammed-DDmLM1+adcrQT0dZR+AlfA,
	rgumasta-DDmLM1+adcrQT0dZR+AlfA, Krishna Yarlagadda

From: Shardar Shariff Md <smohammed-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

When I2C_HEADER_CONT_ON_NAK bit in IO header is set then “No ACK
from slave” error is not reported (NACK is considered as ACK
and transfer is continued). So if I2C_ERR_NO_ACK is set, it would
imply I2C_M_IGNORE_NAK is not set and hence this code will never
execute. When I2C_HEADER_CONT_ON_NAK bit in IO header is set then
“No ACK from slave” error is not reported.
Condition (msg->flags & I2C_M_IGNORE_NAK) will never be hit

Signed-off-by: Shardar Shariff Md <smohammed-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Krishna Yarlagadda <kyarlagadda-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/i2c/busses/i2c-tegra.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 1577296..c6c870c 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -1336,11 +1336,8 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev,
 		return -EAGAIN;
 	}
 
-	if (i2c_dev->msg_err == I2C_ERR_NO_ACK) {
-		if (msg->flags & I2C_M_IGNORE_NAK)
-			return 0;
+	if (i2c_dev->msg_err == I2C_ERR_NO_ACK)
 		return -EREMOTEIO;
-	}
 
 	return -EIO;
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-07-25 11:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 12:18 [PATCH 1/7] i2c: tegra: remove dead code Krishna Yarlagadda
2020-07-23 12:18 ` [PATCH 2/7] i2c: tegra: Fix setting of controller ID Krishna Yarlagadda
2020-07-23 12:18 ` [PATCH 4/7] i2c: tegra: add high speed mode support Krishna Yarlagadda
     [not found]   ` <1595506733-10307-4-git-send-email-kyarlagadda-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-07-23 13:27     ` Dmitry Osipenko
2020-07-25 11:26   ` Michał Mirosław
2020-07-23 12:18 ` [PATCH 5/7] i2c: tegra: enable second level clock gating Krishna Yarlagadda
2020-07-23 14:01   ` Dmitry Osipenko
2020-07-23 12:18 ` [PATCH 6/7] i2c: tegra: DMA support for t186 and t194 Krishna Yarlagadda
     [not found]   ` <1595506733-10307-6-git-send-email-kyarlagadda-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-07-23 13:16     ` Dmitry Osipenko
2020-07-23 13:38     ` Dmitry Osipenko
     [not found] ` <1595506733-10307-1-git-send-email-kyarlagadda-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-07-23 12:18   ` [PATCH 3/7] i2c: tegra: add flag for register write buffering Krishna Yarlagadda
2020-07-23 13:17     ` Dmitry Osipenko
2020-07-23 12:18   ` [PATCH 7/7] i2c: tegra: dump I2C registers on timeout Krishna Yarlagadda

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).