]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
i2c: xlp9xx: Handle I2C_M_RECV_LEN in msg->flags
authorKamlakant Patel <kamlakant.patel@cavium.com>
Thu, 4 Jan 2018 17:37:32 +0000 (10:37 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 16 Feb 2018 17:41:58 +0000 (12:41 -0500)
commit32e7b1145b56e24fa2df7c37e15edbf60b039a8a
tree2f77b6e78942169731f8691c5323fb51e9836d67
parent7aec960996db059053cfd6a4ead32dd64cfef222
i2c: xlp9xx: Handle I2C_M_RECV_LEN in msg->flags

BugLink: https://bugs.launchpad.net/bugs/1738073
The driver needs to handle the flag I2C_M_RECV_LEN during receive to
support SMBus emulation.

Update receive logic to handle the case where the length is received
as the first byte of a transaction.

Also update the code to handle I2C_CLIENT_PEC, which is set when the
client sends a packet error checking code byte.

Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
Signed-off-by: Kamlakant Patel <kamlakant.patel@cavium.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 5515ae112172e20667f02b16f45fbf992923dcb0)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/i2c/busses/i2c-xlp9xx.c