]> 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)
commit7ec4a877488856e522fec99cdad7efcc4afc7f2d
tree6189df5e937b85cc2bb04a5d4c6930e0553b35b4
parentbc33a04fe92eb35c59fab4d00cf8b151d6b050d9
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: 151cee8182d1 ("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