i2c: sh_mobile: add new frequency calculation for later SoC
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 18 Dec 2017 21:58:01 +0000 (22:58 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 15 Jan 2018 17:01:14 +0000 (18:01 +0100)
commit4ecfb9d3b229fff538c706650a8208fa03660c22
tree937577af66d9fd5f7b7db59e5862f825b436404a
parentc3449f73a80b2b04a3f7ff69be871c153ea1a9fa
i2c: sh_mobile: add new frequency calculation for later SoC

The formula to generate the desired bus speeds has changed a little over
time. Implement the new formula and allow drivers to opt-in by changing
to this new config set. Ensure in probe that we don't divide by zero.
The returned values on a R-Car H2 (r8a7790/Lager board) match the
suggested values in the datasheet.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-sh_mobile.c