summaryrefslogtreecommitdiff
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-01-19 18:05:29 -0800
committerMichael Turquette <mturquette@linaro.org>2015-01-27 11:48:52 -0800
commitbca9690b942654f668ffb5124b2bbd0ba0f007bb (patch)
treeb0e4a32c3175916fbe680dbad1687ac9c7185221 /include/linux/clk-provider.h
parent15a02c1f6dd7c2bb150c61d00ffb33f584ff2288 (diff)
clk: divider: Make generic for usage elsewhere
Some devices don't use mmio to interact with dividers. Split out the logic from the register read/write parts so that we can reuse the division logic elsewhere. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Tested-by: Kenneth Westfield <kwestfie@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index ba858e90d5de..0ed5bf2209ad 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -353,6 +353,17 @@ struct clk_divider {
#define CLK_DIVIDER_READ_ONLY BIT(5)
extern const struct clk_ops clk_divider_ops;
+
+unsigned long divider_recalc_rate(struct clk_hw *hw, unsigned long parent_rate,
+ unsigned int val, const struct clk_div_table *table,
+ unsigned long flags);
+long divider_round_rate(struct clk_hw *hw, unsigned long rate,
+ unsigned long *prate, const struct clk_div_table *table,
+ u8 width, unsigned long flags);
+int divider_get_val(unsigned long rate, unsigned long parent_rate,
+ const struct clk_div_table *table, u8 width,
+ unsigned long flags);
+
struct clk *clk_register_divider(struct device *dev, const char *name,
const char *parent_name, unsigned long flags,
void __iomem *reg, u8 shift, u8 width,