summaryrefslogtreecommitdiffstats
path: root/drivers/clk/qcom/common.h
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@codeaurora.org>2016-11-21 12:07:11 +0530
committerStephen Boyd <sboyd@codeaurora.org>2016-11-23 11:00:05 -0800
commit081ba80206d6b53d45ee31bc6c90871e8cfbc117 (patch)
tree82a093ec8ca01dd8fe7173ce23964873c5696d09 /drivers/clk/qcom/common.h
parentc705d22b64f20ee4716336df46ce2fc5c8ac8670 (diff)
downloadlinux-081ba80206d6b53d45ee31bc6c90871e8cfbc117.tar.bz2
clk: qcom: Add rcg ops to return floor value closest to the requested rate
The default behaviour with clk_rcg2_ops is for the clk_round_rate()/clk_set_rate() to return/set a ceil clock rate closest to the requested rate by looking up the corresponding frequency table. However, we do have some instances (mainly sdcc on various platforms) of clients expecting a clk_set_rate() to set a floor value instead. Add a new clk_rcg2_floor_ops to handle this for such specific rcg instances Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/qcom/common.h')
-rw-r--r--drivers/clk/qcom/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
index 9fb5b8e89071..23c1927669ba 100644
--- a/drivers/clk/qcom/common.h
+++ b/drivers/clk/qcom/common.h
@@ -41,6 +41,8 @@ struct qcom_cc_desc {
extern const struct freq_tbl *qcom_find_freq(const struct freq_tbl *f,
unsigned long rate);
+extern const struct freq_tbl *qcom_find_freq_floor(const struct freq_tbl *f,
+ unsigned long rate);
extern void
qcom_pll_set_fsm_mode(struct regmap *m, u32 reg, u8 bias_count, u8 lock_count);
extern int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map,