]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: fix bus recovery stop mode timing
authorRussell King <rmk+kernel@armlinux.org.uk>
Sun, 15 Dec 2019 16:39:05 +0000 (16:39 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 9 Jan 2020 21:21:08 +0000 (22:21 +0100)
commitfade1c88b7a9a0564fd8fcd3499f8d7f51a204ac
tree8b3afdb2fa09a0a1ae660a53f8799bc3239746f4
parentde9dd58951eac657fd1f30a53d10592146fda39d
i2c: fix bus recovery stop mode timing

The I2C specification states that tsu:sto for standard mode timing must
be at minimum 4us. Pictographically, this is:

SCL: ____/~~~~~~~~~
SDA: _________/~~~~
       ->|    |<- 4us minimum

We are currently waiting 2.5us between asserting SCL and SDA, which is
in violation of the standard. Adjust the timings to ensure that we meet
what is stipulated as the minimum timings to ensure that all devices
correctly interpret the STOP bus transition.

This is more important than trying to generate a square wave with even
duty cycle.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-base.c