]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: testunit: don't erase registers after STOP
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 27 Jun 2024 11:14:47 +0000 (13:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jul 2024 07:33:56 +0000 (09:33 +0200)
commit37bec254ee757ea4dc2602a3b35d592d9a3dad77
tree7828b7ed0d0c4aa740fc15ac40980ccd51d52494
parentb89b0af97dc51e8bcd3899a17b4e1beddb5c41c6
i2c: testunit: don't erase registers after STOP

[ Upstream commit c422b6a630240f706063e0ecbb894aa8491b1fa1 ]

STOP fallsthrough to WRITE_REQUESTED but this became problematic when
clearing the testunit registers was added to the latter. Actually, there
is no reason to clear the testunit state after STOP. Doing it when a new
WRITE_REQUESTED arrives is enough. So, no need to fallthrough, at all.

Fixes: b39ab96aa894 ("i2c: testunit: add support for block process calls")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/i2c-slave-testunit.c