i2c: uniphier-f: fix misdetection of incomplete STOP condition
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 23 Sep 2016 13:34:41 +0000 (22:34 +0900)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 24 Sep 2016 09:19:15 +0000 (11:19 +0200)
commitfcbd4bddb314346a35295701f385b9627bb3a137
tree67bd4016f5d6dcb5659d0c9df82956fd7d79d1cc
parent6212e1d6ed4018ae3d3e6079ea0c45df346c97a6
i2c: uniphier-f: fix misdetection of incomplete STOP condition

Currently, the status register FI2C_SR is checked immediately after
a STOP condition is issued in case of the deferred STOP condition.
It takes typically 5-10 usec until the corresponding bits in the
register are set, so the error check for "stop condition was not
completed" is very likely to be false positive.

Add wait code to relax the status register check.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-uniphier-f.c