]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: meson: fixup rate calculation with filter delay
authorNicolas Belin <nbelin@baylibre.com>
Wed, 7 Oct 2020 08:07:51 +0000 (10:07 +0200)
committerWolfram Sang <wsa@kernel.org>
Thu, 8 Oct 2020 09:57:23 +0000 (11:57 +0200)
commita8b5e77853abc4c55b041e0915c3c927ab73c245
treea615896a693371d8522e6f5446c386a1e87aa0fa
parent07f824e5420407e004b6c02265df5f24dd4c4cc7
i2c: meson: fixup rate calculation with filter delay

Apparently, 15 cycles of the peripheral clock are used by the controller
for sampling and filtering. Because this was not known before, the rate
calculation is slightly off.

Clean up and fix the calculation taking this filtering delay into account.

Fixes: 3fd9c17e084c ("i2c: add support for Amlogic Meson I2C controller")
Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-meson.c