i2c: aspeed: Reset the i2c controller when timeout occurs
authorTommy Huang <tommy_huang@aspeedtech.com>
Wed, 6 Sep 2023 00:49:10 +0000 (08:49 +0800)
committerWolfram Sang <wsa@kernel.org>
Wed, 13 Sep 2023 09:04:25 +0000 (11:04 +0200)
commitfee465150b458351b6d9b9f66084f3cc3022b88b
treec078af572cc82505e483d2586703522ff14fa7a0
parentb2cacc2e818717545e6d0cc453b72f98249398bf
i2c: aspeed: Reset the i2c controller when timeout occurs

Reset the i2c controller when an i2c transfer timeout occurs.
The remaining interrupts and device should be reset to avoid
unpredictable controller behavior.

Fixes: 2e57b7cebb98 ("i2c: aspeed: Add multi-master use case support")
Cc: <stable@vger.kernel.org> # v5.1+
Signed-off-by: Tommy Huang <tommy_huang@aspeedtech.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-aspeed.c