i2c: cadence: Remove unnecessary register reads
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 7 Jan 2023 21:18:14 +0000 (13:18 -0800)
committerWolfram Sang <wsa@kernel.org>
Thu, 16 Mar 2023 19:29:38 +0000 (20:29 +0100)
commitff0cf7bca63092786d640820a18f3e746b02e172
tree6edbdc504ca02d0bfd5eb43a004f4587a0311a46
parente9d373c3feffc7fb36927837254c25081b3da4a9
i2c: cadence: Remove unnecessary register reads

In the `cdns_i2c_mrecv()` function the CTRL register of the Cadence I2C
controller is written and read back multiple times. The register value does
not change on its own. So it is possible to remember the just written value
instead of reading it back from the hardware.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-cadence.c