i2c: rcar: always clear ICSAR to avoid side effects
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 4 Jul 2020 13:38:29 +0000 (15:38 +0200)
committerWolfram Sang <wsa@kernel.org>
Thu, 23 Jul 2020 20:25:18 +0000 (22:25 +0200)
commiteb01597158ffb1853a7a7fc2c57d4c844640f75e
treefc036b7772f2ae2e5ebee8bd6390101e428336ef
parent436d17675be1c090f08d4eddf1d7193cacf0e9be
i2c: rcar: always clear ICSAR to avoid side effects

On R-Car Gen2, we get a timeout when reading from the address set in
ICSAR, even though the slave interface is disabled. Clearing it fixes
this situation. Note that Gen3 is not affected.

To reproduce: bind and undbind an I2C slave on some bus, run
'i2cdetect' on that bus.

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>
drivers/i2c/busses/i2c-rcar.c