]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
i2c: xlp9xx: Handle transactions with I2C_M_RECV_LEN properly
authorGeorge Cherian <george.cherian@cavium.com>
Tue, 10 Apr 2018 19:29:35 +0000 (13:29 -0600)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Apr 2018 15:12:21 +0000 (10:12 -0500)
commit323879c84e3dbcb04edaf0045645a9bb8d51b993
treeebaca491f31d936a1106602f5e3ad76052c4a15f
parent9fe4b5fe1a6338fd26352bfafbcdf234ced022ba
i2c: xlp9xx: Handle transactions with I2C_M_RECV_LEN properly

BugLink: https://bugs.launchpad.net/bugs/1762812
In case of transaction with I2C_M_RECV_LEN set, make sure the driver reads
the first byte and then updates the RX fifo with the expected length. Set
threshold to 1 byte so that driver gets an interrupt on receiving the first byte.
After which the transfer length is updated depending on the received length.
Also report SMBus block read functionality.

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