linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] i2c: i2c-mxs: Use DMA mode even for small transfers
@ 2013-07-01 21:14 Fabio Estevam
  2013-07-02  2:23 ` Shawn Guo
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Fabio Estevam @ 2013-07-01 21:14 UTC (permalink / raw)
  To: wsa
  Cc: marex, shawn.guo, kernel, linux-i2c, alexandre.belloni,
	to-fleischer, Fabio Estevam, stable

From: Fabio Estevam <fabio.estevam@freescale.com>

Recently we have been seing some reports about PIO mode not working properly.

- http://www.spinics.net/lists/linux-i2c/msg11985.html
- http://marc.info/?l=linux-i2c&m=137235593101385&w=2
- https://lkml.org/lkml/2013/6/24/430

Let's use DMA mode even for small transfers.

Without this patch, i2c reads the incorrect sgtl5000 version on a mx28evk when
touchscreen is enabled:
                                           
[    5.856270] sgtl5000 0-000a: Device with ID register 0 is not a sgtl5000     
[    9.877307] sgtl5000 0-000a: ASoC: failed to probe CODEC -19                 
[    9.883528] mxs-sgtl5000 sound.12: ASoC: failed to instantiate card -19      
[    9.892955] mxs-sgtl5000 sound.12: snd_soc_register_card failed (-19)  

Cc: <stable@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Applies against 3.10

Changes since v1:
- Keep the PIO code

 drivers/i2c/busses/i2c-mxs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 2039f23..6d8094d 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -494,7 +494,7 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg,
 	 * based on this empirical measurement and a lot of previous frobbing.
 	 */
 	i2c->cmd_err = 0;
-	if (msg->len < 8) {
+	if (0) {	/* disable PIO mode until a proper fix is made */
 		ret = mxs_i2c_pio_setup_xfer(adap, msg, flags);
 		if (ret)
 			mxs_i2c_reset(i2c);
-- 
1.8.1.2

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

end of thread, other threads:[~2013-08-05  8:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 21:14 [PATCH v2] i2c: i2c-mxs: Use DMA mode even for small transfers Fabio Estevam
2013-07-02  2:23 ` Shawn Guo
2013-07-15 13:30   ` Fabio Estevam
     [not found]     ` <CAOMZO5Dyk_5CzcXvG7eJ3h07i=So0DS7MjtMQVHfpfx9Se_Teg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-15 14:12       ` Marek Vasut
2013-07-23 18:15     ` Fabio Estevam
2013-07-24  3:02       ` Marek Vasut
2013-07-24  3:09         ` Fabio Estevam
2013-07-26  0:46           ` Ben Hutchings
2013-07-26  4:20             ` Marek Vasut
     [not found] ` <1372713261-20551-1-git-send-email-festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-02  8:16   ` Lucas Stach
2013-07-03  2:38     ` Marek Vasut
     [not found]       ` <201307030438.50069.marex-ynQEQJNshbs@public.gmane.org>
2013-07-03  4:37         ` Marek Vasut
2013-07-03  8:33           ` Alexandre Belloni
     [not found]             ` <51D3E1D2.4070706-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2013-07-03 11:41               ` Marek Vasut
     [not found]           ` <201307030637.05324.marex-ynQEQJNshbs@public.gmane.org>
2013-07-03  9:11             ` Lucas Stach
     [not found]               ` <1372842695.4440.3.camel-WzVe3FnzCwFR6QfukMTsflXZhhPuCNm+@public.gmane.org>
2013-07-03 11:39                 ` Marek Vasut
2013-08-05  8:11 ` 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).