i2c: rk3x: Move spec timing data to "static const" structs
authorDavid Wu <david.wu@rock-chips.com>
Mon, 16 May 2016 14:03:24 +0000 (22:03 +0800)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 17 Jun 2016 11:39:15 +0000 (13:39 +0200)
commitb58fd3be40a21a88520d4a3682330abbbc021cc7
treeac84d7baa387f4188a2072865d5bf001e7e8c8b2
parentbef358c4fe2efa7467297303cafe973748afda93
i2c: rk3x: Move spec timing data to "static const" structs

The i2c timing specs are really just constant data. There's no reason
to write code to init them, so move them out to structures. This not
only is a cleaner solution but it will reduce code duplication when we
introduce a new variant of rk3x_i2c_calc_divs() in a future patch.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Suggested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-rk3x.c