]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
i2c: xlp9xx: Handle NACK on DATA properly
authorGeorge Cherian <george.cherian@cavium.com>
Tue, 10 Apr 2018 19:29:37 +0000 (13:29 -0600)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Apr 2018 15:12:21 +0000 (10:12 -0500)
commita12cb271300dddc09dad1bfed77ddeca06a344ee
tree959e090b8536a3125e51db3701c3aa7bb709e668
parent2fbdba2bef6238b5c6777b36bb777d485321a2e1
i2c: xlp9xx: Handle NACK on DATA properly

BugLink: https://bugs.launchpad.net/bugs/1762812
In case we receive NACK on DATA we shouldn't be resetting the controller,
rather we should issue STOP command. This will terminate the current
transaction and -EIO is returned.

While at that handle the SMBus Quick Command properly.
We shouldn't be setting the XLP9XX_I2C_CMD_READ/WRITE for such
transactions.

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 e349d7d08e7044caf37a36409305edbd5af013c7)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/i2c/busses/i2c-xlp9xx.c