]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: rcar: in slave mode, clear NACK earlier
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 17 Aug 2020 12:19:30 +0000 (14:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:22:29 +0000 (11:22 +0200)
commit6fd5a1673f6b5ed5546dcd8dfe895723681ec0d1
treec8fd0814f4ab52ad690b18171c8232ea50b86469
parent3146b3220c1b1c3f6b91d1f3a4bb234d51813114
i2c: rcar: in slave mode, clear NACK earlier

[ Upstream commit 914a7b3563b8fb92f976619bbd0fa3a4a708baae ]

Currently, a NACK in slave mode is set/cleared when SCL is held low by
the IP core right before the bit is about to be pushed out. This is too
late for clearing and then a NACK from the previous byte is still used
for the current one. Now, let's clear the NACK right after we detected
the STOP condition following the NACK.

Fixes: de20d1857dd6 ("i2c: rcar: add slave support")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-rcar.c