i2c: sprd: Fix the i2c count issue
authorBaolin Wang <baolin.wang@linaro.org>
Mon, 9 Apr 2018 06:40:55 +0000 (14:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:02:49 +0000 (04:02 +0900)
commitf1e5bbe86ec13618fc39d2b01ad166cfa335b488
tree6bbf0e1ad8be82badb467b5c9b07093ec4d9c2f1
parent201dc1345bfe7228d74830767f2a8de7be9b9723
i2c: sprd: Fix the i2c count issue

[ Upstream commit 2a010461207cc96bee5ab81748325dec1972976f ]

We found the I2C controller count register is unreliable sometimes,
that will cause I2C to lose data. Thus we can read the data count
from 'i2c_dev->count' instead of the I2C controller count register.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-sprd.c