]> git.hungrycats.org Git - linux/commit
i2c: imx: when being a target, mark the last read as processed
authorCorey Minyard <minyard@acm.org>
Wed, 21 Feb 2024 19:27:13 +0000 (20:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:22:00 +0000 (13:22 +0100)
commitaade859419cec186b017ad5d3833812b201368a4
treefdae5583696439dca08f4e15a950c3be24572732
parentcb21407f0b3983986f57cdf5087df7f498040ba6
i2c: imx: when being a target, mark the last read as processed

[ Upstream commit 87aec499368d488c20292952d6d4be7cb9e49c5e ]

When being a target, NAK from the controller means that all bytes have
been transferred. So, the last byte needs also to be marked as
'processed'. Otherwise index registers of backends may not increase.

Fixes: f7414cd6923f ("i2c: imx: support slave mode for imx I2C driver")
Signed-off-by: Corey Minyard <minyard@acm.org>
Tested-by: Andrew Manley <andrew.manley@sealingtech.com>
Reviewed-by: Andrew Manley <andrew.manley@sealingtech.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
[wsa: fixed comment and commit message to properly describe the case]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-imx.c