This is a note to let you know that I've just added the patch titled
i2c: rk3x: fix bug that cause transfer fails in master receive mode
to the 3.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
i2c-rk3x-fix-bug-that-cause-transfer-fails-in-master-receive-mode.patch
and it can be found in the queue-3.16 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 5da4309f9e1b4de9c2b69e917912fbb84006d44e Mon Sep 17 00:00:00 2001
From: addy ke <[email protected]>
Date: Sat, 23 Aug 2014 02:00:52 +0800
Subject: i2c: rk3x: fix bug that cause transfer fails in master receive mode
From: addy ke <[email protected]>
commit 5da4309f9e1b4de9c2b69e917912fbb84006d44e upstream.
In rk3x SOC, the I2C controller can receive/transmit up to 32 bytes data
in one chunk, so the size of data to be write/read to/from TXDATAx/RXDATAx
must be less than or equal 32 bytes at a time.
Tested on rk3288-pinky board, elan receive 158 bytes data.
Signed-off-by: Addy Ke <[email protected]>
Acked-by: Max Schwarz <[email protected]>
Reviewed-by: Doug Anderson <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/i2c/busses/i2c-rk3x.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/i2c/busses/i2c-rk3x.c
+++ b/drivers/i2c/busses/i2c-rk3x.c
@@ -323,6 +323,10 @@ static void rk3x_i2c_handle_read(struct
/* ack interrupt */
i2c_writel(i2c, REG_INT_MBRF, REG_IPD);
+ /* Can only handle a maximum of 32 bytes at a time */
+ if (len > 32)
+ len = 32;
+
/* read the data from receive buffer */
for (i = 0; i < len; ++i) {
if (i % 4 == 0)
Patches currently in stable-queue which might be from [email protected] are
queue-3.16/i2c-rk3x-fix-divisor-calculation-for-scl-frequency.patch
queue-3.16/i2c-rk3x-fix-bug-that-cause-transfer-fails-in-master-receive-mode.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html