]> 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)
commite0e95cc620cd9fd1dd990e851e41fb20da67d450
treea615896a693371d8522e6f5446c386a1e87aa0fa
parent0d0b4687ba791069026ff3ca72d3a88179ad2ef6
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: 151cee8182d1 ("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