i2c: rcar: calculate divider instead of brute-forcing it
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 6 Sep 2023 20:00:21 +0000 (22:00 +0200)
committerWolfram Sang <wsa@kernel.org>
Tue, 19 Sep 2023 09:10:54 +0000 (11:10 +0200)
commit47280af872367ead8202b8503083b0b4016b667b
tree29e03a3e4dabb9cd1a8472c11a45b822a4e2d8f0
parentd72857907af04f47e6844544160be42b0ad56edd
i2c: rcar: calculate divider instead of brute-forcing it

Instead of trying all values, we can actually compute it as the comment
suggests. It is unclear what the comment means with "involved", it works
nicely.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-rcar.c