]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
i2c: xlp9xx: Check for Bus state before every transfer
authorGeorge Cherian <george.cherian@cavium.com>
Tue, 10 Apr 2018 19:29:36 +0000 (13:29 -0600)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Apr 2018 15:12:21 +0000 (10:12 -0500)
commit2fbdba2bef6238b5c6777b36bb777d485321a2e1
tree83f1c4bd4ec0eab2764013606b3f57623d31dc29
parent323879c84e3dbcb04edaf0045645a9bb8d51b993
i2c: xlp9xx: Check for Bus state before every transfer

BugLink: https://bugs.launchpad.net/bugs/1762812
I2C bus enters the STOP condition after the DATA_DONE interrupt is raised.
Essentially the driver should be checking the bus state before sending
any transaction. In case a transaction is initiated while the
bus is busy, the prior transaction's stop condition is not achieved.
Add the check to make sure the bus is not busy before every transaction.

Signed-off-by: George Cherian <george.cherian@cavium.com>
Reviewed-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit d3898a78521cd383d287b3ed5683f914c48c3be9)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/i2c/busses/i2c-xlp9xx.c