]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
i2c: xlp9xx: Handle transactions with I2C_M_RECV_LEN properly
authorGeorge Cherian <george.cherian@cavium.com>
Thu, 18 Jan 2018 05:39:22 +0000 (05:39 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 26 Feb 2018 20:16:11 +0000 (21:16 +0100)
commit41b1d4de96323e84c0a902e7e4b2c0f367e77f92
treee48694ce26b8c4d3253c4897def5e02fd2e22acd
parentc2a3b3cce8df1cafeda2ab03563d7e703c51a4ac
i2c: xlp9xx: Handle transactions with I2C_M_RECV_LEN properly

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>
drivers/i2c/busses/i2c-xlp9xx.c