clk: divider: Add round to closest divider
authorMaxime COQUELIN <maxime.coquelin@st.com>
Wed, 29 Jan 2014 16:24:07 +0000 (17:24 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 8 Dec 2014 19:26:53 +0000 (19:26 +0000)
commit87ad06cba792914a542304c9d11ad49d9878a759
treeb3e46d978de85f55fa89085f3c270f4ced30507d
parent4798aabda988227905af280bac79600ef5d31377
clk: divider: Add round to closest divider

In some cases, we want to be able to round the divider to the closest one,
instead than rounding up.

This patch adds a new CLK_DIVIDER_ROUND_CLOSEST flag to specify the divider
has to round to closest div, keeping rounding up as de default behaviour.

Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
(cherry picked from commit 774b514390b1eb8476bc759262790762bd1ef45a)
Signed-off-by: Mark Brown <broonie@kernel.org>
Conflicts:
include/linux/clk-provider.h
drivers/clk/clk-divider.c
include/linux/clk-provider.h