]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: meson: fix clock setting overwrite
authorJerome Brunet <jbrunet@baylibre.com>
Wed, 7 Oct 2020 08:07:49 +0000 (10:07 +0200)
committerWolfram Sang <wsa@kernel.org>
Thu, 8 Oct 2020 09:57:06 +0000 (11:57 +0200)
commit72ca5cb68a16f453b058f49eeee50ce163cb18a4
tree6189df5e937b85cc2bb04a5d4c6930e0553b35b4
parent7bd6a17392e6a48a69f969234cde971d03072444
i2c: meson: fix clock setting overwrite

When the slave address is written in do_start(), SLAVE_ADDR is written
completely. This may overwrite some setting related to the clock rate
or signal filtering.

Fix this by writing only the bits related to slave address. To avoid
causing unexpected changed, explicitly disable filtering or high/low
clock mode which may have been left over by the bootloader.

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