]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
i2c: xlp9xx: Check for Bus state before every transfer
authorGeorge Cherian <george.cherian@cavium.com>
Tue, 10 Apr 2018 19:29:00 +0000 (21:29 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 7 May 2018 11:15:57 +0000 (13:15 +0200)
commit91c01c86c257a6669f08cdac0c9beec31be53997
tree215b15966892e560bfd3339d61cd3eb766ba4b24
parent3085b122c50ac52979680a5eeb82999a9542e4a8
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>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/i2c/busses/i2c-xlp9xx.c