From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Kochetkov Subject: Question about patch "i2c: omap: resize fifos before each message" Date: Wed, 3 Dec 2014 18:11:18 +0300 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Return-path: Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Felipe Balbi Cc: Kevin Hilman , Tony Lindgren , Wolfram Sang , linux-omap , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML List-Id: linux-i2c@vger.kernel.org Felipe, Question about the patch[1]. I want to change the code in a way to not touch fifo thresholds for each message. Because: 1. dev->threshold is valid only with checking of transfer direction. So, if last transfer was transmission and ISR get RRDY interrupt from slave receiver, then dev->threshold is invalid. We must read threshold value from BUF register, to process correctly. 2. I want to avoid changing fifos before message submission, because IP can start receiving message in a slave mode (race). 3. dev->threshold is changed in range 1-fifo_size/2. So instead of RDR we get RRDY and for messages larger then fifo_size/2 we still get RRDY and RDR. Felipe, do you have in mind why do you want to avoid RDR and XDR events? Something about errata? [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/i2c/busses/i2c-omap.c?id=dd74548ddece4b9d68e5528287a272fa552c81d0