clk: fractional-divider: allow overriding of approximation
authorElaine Zhang <zhangqing@rock-chips.com>
Tue, 1 Aug 2017 16:21:22 +0000 (18:21 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Tue, 8 Aug 2017 15:39:48 +0000 (17:39 +0200)
commitec52e462564b9c5bfdf1f79638c537c7103e1d2b
treecb1cb6ce6240d2de48708f38e619d0a270875e67
parent334614058886fc5002dbfa2c4c72f89b3830f7e1
clk: fractional-divider: allow overriding of approximation

Fractional dividers may have special requirements concerning numerator
and denominator selection that differ from just getting the best
approximation.

For example on Rockchip socs the denominator must be at least 20 times
larger than the numerator to generate precise clock frequencies.

Therefore add the ability to provide custom approximation functions.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/clk/clk-fractional-divider.c
include/linux/clk-provider.h