i2c: recovery: if possible send STOP with recovery pulses
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 10 Jul 2018 21:42:15 +0000 (23:42 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 12 Jul 2018 21:38:18 +0000 (23:38 +0200)
commitabe41184abac487264a4904bfcff2d5500dccce6
tree079664694459227f87514f271b64267315e46e3b
parent54836e2d03e76d80aec3399368ffaf5b7caadd1b
i2c: recovery: if possible send STOP with recovery pulses

I2C clients may misunderstand recovery pulses if they can't read SDA to
bail out early. In the worst case, as a write operation. To avoid that
and if we can write SDA, try to send STOP to avoid the
misinterpretation.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
drivers/i2c/i2c-core-base.c