i2c: at91: Send bus clear command if SDA is down
authorCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
Tue, 25 Feb 2020 15:50:09 +0000 (17:50 +0200)
committerWolfram Sang <wsa@kernel.org>
Tue, 5 May 2020 14:37:21 +0000 (16:37 +0200)
commit73371d5f313aa056a451f84b652623da6054f89b
tree1052e339cc6101cf65a6ecc55823a160ad35cb3a
parente896be5ad1017aa710f8b979036a43d3e5b2f38d
i2c: at91: Send bus clear command if SDA is down

After a transfer timeout, some faulty I2C slave devices might hold down
the SDA pin. We can generate a bus clear command, hoping that the slave
might release the pins.
If the CLEAR command is not supported, we will use gpio recovery, if
available, to reset the bus.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-at91-core.c
drivers/i2c/busses/i2c-at91-master.c
drivers/i2c/busses/i2c-at91.h