From: Kever Yang <kever.yang@rock-chips.com>
To: Mike Turquette <mturquette@linaro.org>, Heiko Stuebner <heiko@sntech.de>
Cc: dianders@chromium.org, sonnyrao@chromium.org,
addy.ke@rock-chips.com, cf@rock-chips.com, fzf@rock-chips.com,
ykk@rock-chips.com, yzq@rock-chips.com, dkl@rock-chips.com,
huangtao@rock-chips.com, Kever Yang <kever.yang@rock-chips.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/5] clk: divider: make clk_divider_recalc/set_rate available
Date: Tue, 4 Nov 2014 15:52:36 +0800 [thread overview]
Message-ID: <1415087559-19444-3-git-send-email-kever.yang@rock-chips.com> (raw)
In-Reply-To: <1415087559-19444-1-git-send-email-kever.yang@rock-chips.com>
This patch makes these two function available for other file,
which may help to make costom usage of clock divider type.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
drivers/clk/clk-divider.c | 4 ++--
include/linux/clk-provider.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index 18a9de2..f3f55a8 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -109,7 +109,7 @@ static unsigned int _get_val(struct clk_divider *divider, unsigned int div)
return div - 1;
}
-static unsigned long clk_divider_recalc_rate(struct clk_hw *hw,
+unsigned long clk_divider_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{
struct clk_divider *divider = to_clk_divider(hw);
@@ -318,7 +318,7 @@ static long clk_divider_round_rate(struct clk_hw *hw, unsigned long rate,
return DIV_ROUND_UP(*prate, div);
}
-static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate,
+int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{
struct clk_divider *divider = to_clk_divider(hw);
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index be21af1..7947fe9 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -555,6 +555,10 @@ struct clk *__clk_lookup(const char *name);
long __clk_mux_determine_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *best_parent_rate,
struct clk **best_parent_p);
+unsigned long clk_divider_recalc_rate(struct clk_hw *hw,
+ unsigned long parent_rate);
+int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate,
+ unsigned long parent_rate);
/*
* FIXME clock api without lock protection
--
1.9.1
next prev parent reply other threads:[~2014-11-04 7:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 7:52 [PATCH 0/5] clk: rockchip: add full support for HDMI clock on rk3288 Kever Yang
2014-11-04 7:52 ` [PATCH 1/5] clk: rockchip: add some clock rate into rate table for rk3288 Kever Yang
2014-11-04 7:52 ` Kever Yang [this message]
2014-11-04 7:52 ` [PATCH 3/5] clk: rockchip: introduce the div_ops handling for composite branches Kever Yang
2014-11-04 7:52 ` [PATCH 4/5] clk: rockchip: add the vop_determine_rate for vop dclock Kever Yang
2014-11-04 7:52 ` [PATCH 5/5] clk: rockchip: change DCLK_VOP0 to use new COMPOSITE_DIVOPS Kever Yang
2014-11-06 21:06 ` [PATCH 0/5] clk: rockchip: add full support for HDMI clock on rk3288 Heiko Stübner
2014-11-13 8:52 ` Kever Yang
2014-11-13 22:59 ` Doug Anderson
[not found] ` <20141114014605.25314.49766@quantum>
2014-11-14 8:58 ` Kever Yang
2016-01-19 12:02 ` Tomeu Vizoso
2016-01-20 16:50 ` Doug Anderson
2016-01-21 9:03 ` Tomeu Vizoso
2016-01-21 20:11 ` Doug Anderson
2016-01-22 14:00 ` Tomeu Vizoso
2016-01-22 17:07 ` Doug Anderson
2016-01-26 8:28 ` Tomeu Vizoso
2016-01-26 16:32 ` Doug Anderson
2016-01-27 10:20 ` Tomeu Vizoso
2016-01-27 16:46 ` Doug Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415087559-19444-3-git-send-email-kever.yang@rock-chips.com \
--to=kever.yang@rock-chips.com \
--cc=addy.ke@rock-chips.com \
--cc=cf@rock-chips.com \
--cc=dianders@chromium.org \
--cc=dkl@rock-chips.com \
--cc=fzf@rock-chips.com \
--cc=heiko@sntech.de \
--cc=huangtao@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=sonnyrao@chromium.org \
--cc=ykk@rock-chips.com \
--cc=yzq@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®