]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit1334d3b4e49e35d8912a7c37ffca4c5afb9a0516
treea615896a693371d8522e6f5446c386a1e87aa0fa
parent79e137b1540165f788394658442284d55a858984
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: 30021e3707a7 ("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