From: Neil Armstrong <narmstrong@baylibre.com>
To: jbrunet@baylibre.com, khilman@baylibre.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-clk@vger.kernel.org, martin.blumenstingl@googlemail.com,
linux-gpio@vger.kernel.org,
Neil Armstrong <narmstrong@baylibre.com>
Subject: [RFC/RFT v2 03/14] clk: meson: regmap: export regmap_div ops functions
Date: Wed, 26 Jun 2019 11:06:21 +0200 [thread overview]
Message-ID: <20190626090632.7540-4-narmstrong@baylibre.com> (raw)
In-Reply-To: <20190626090632.7540-1-narmstrong@baylibre.com>
The G12A CPU Clock Postmux divider needs a custom div_set_rate() call.
Export the clk_regmap_div_round_rate() and clk_regmap_div_recalc_rate()
to be able to override the default clk_regmap_div_set_rate() callback.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/clk/meson/clk-regmap.c | 10 ++++++----
drivers/clk/meson/clk-regmap.h | 5 +++++
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/meson/clk-regmap.c b/drivers/clk/meson/clk-regmap.c
index dcd1757cc5df..26c8c74a8cf0 100644
--- a/drivers/clk/meson/clk-regmap.c
+++ b/drivers/clk/meson/clk-regmap.c
@@ -56,8 +56,8 @@ const struct clk_ops clk_regmap_gate_ro_ops = {
};
EXPORT_SYMBOL_GPL(clk_regmap_gate_ro_ops);
-static unsigned long clk_regmap_div_recalc_rate(struct clk_hw *hw,
- unsigned long prate)
+unsigned long clk_regmap_div_recalc_rate(struct clk_hw *hw,
+ unsigned long prate)
{
struct clk_regmap *clk = to_clk_regmap(hw);
struct clk_regmap_div_data *div = clk_get_regmap_div_data(clk);
@@ -74,9 +74,10 @@ static unsigned long clk_regmap_div_recalc_rate(struct clk_hw *hw,
return divider_recalc_rate(hw, prate, val, div->table, div->flags,
div->width);
}
+EXPORT_SYMBOL_GPL(clk_regmap_div_recalc_rate);
-static long clk_regmap_div_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *prate)
+long clk_regmap_div_round_rate(struct clk_hw *hw, unsigned long rate,
+ unsigned long *prate)
{
struct clk_regmap *clk = to_clk_regmap(hw);
struct clk_regmap_div_data *div = clk_get_regmap_div_data(clk);
@@ -100,6 +101,7 @@ static long clk_regmap_div_round_rate(struct clk_hw *hw, unsigned long rate,
return divider_round_rate(hw, rate, prate, div->table, div->width,
div->flags);
}
+EXPORT_SYMBOL_GPL(clk_regmap_div_round_rate);
static int clk_regmap_div_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
diff --git a/drivers/clk/meson/clk-regmap.h b/drivers/clk/meson/clk-regmap.h
index 1dd0abe3ba91..d22b83fb9bad 100644
--- a/drivers/clk/meson/clk-regmap.h
+++ b/drivers/clk/meson/clk-regmap.h
@@ -78,6 +78,11 @@ clk_get_regmap_div_data(struct clk_regmap *clk)
return (struct clk_regmap_div_data *)clk->data;
}
+unsigned long clk_regmap_div_recalc_rate(struct clk_hw *hw,
+ unsigned long prate);
+long clk_regmap_div_round_rate(struct clk_hw *hw, unsigned long rate,
+ unsigned long *prate);
+
extern const struct clk_ops clk_regmap_divider_ops;
extern const struct clk_ops clk_regmap_divider_ro_ops;
--
2.21.0
next prev parent reply other threads:[~2019-06-26 9:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 9:06 [RFC/RFT v2 00/14] arm64: g12a: add support for DVFS Neil Armstrong
2019-06-26 9:06 ` [RFC/RFT v2 01/14] pinctrl: meson-g12a: add pwm_a on GPIOE_2 pinmux Neil Armstrong
2019-06-28 17:59 ` Kevin Hilman
2019-06-26 9:06 ` [RFC/RFT v2 02/14] clk: core: introduce clk_hw_set_parent() Neil Armstrong
2019-06-26 9:06 ` Neil Armstrong [this message]
2019-06-26 9:06 ` [RFC/RFT v2 04/14] clk: meson: eeclk: add setup callback Neil Armstrong
2019-06-26 9:06 ` [RFC/RFT v2 05/14] soc: amlogic: meson-clk-measure: protect measure with a mutex Neil Armstrong
2019-06-28 17:57 ` Kevin Hilman
2019-06-26 9:06 ` [RFC/RFT v2 06/14] soc: amlogic: meson-clk-measure: add G12B second cluster cpu clk Neil Armstrong
2019-06-28 17:58 ` Kevin Hilman
2019-06-26 9:06 ` [RFC/RFT v2 07/14] clk: meson: g12a: add notifiers to handle cpu clock change Neil Armstrong
2019-06-26 9:06 ` [RFC/RFT v2 08/14] clk: meson: g12a: expose CPUB clock ID for G12B Neil Armstrong
2019-06-26 9:06 ` [RFC/RFT v2 09/14] arm64: dts: move common G12A & G12B modes to meson-g12-common.dtsi Neil Armstrong
2019-06-26 9:06 ` [RFC/RFT v2 10/14] arm64: dts: meson-g12-common: add pwm_a on GPIOE_2 pinmux Neil Armstrong
2019-06-26 9:06 ` [RFC/RFT v2 11/14] arm64: dts: meson-g12a: add cpus OPP table Neil Armstrong
2019-06-26 9:06 ` [RFC/RFT v2 12/14] arm64: dts: meson-g12a: enable DVFS on G12A boards Neil Armstrong
2019-06-28 18:08 ` Kevin Hilman
2019-07-01 9:07 ` Neil Armstrong
2019-06-26 9:06 ` [RFC/RFT v2 13/14] arm64: dts: meson-g12b: add cpus OPP tables Neil Armstrong
2019-06-26 9:06 ` [RFC/RFT v2 14/14] arm64: dts: meson-g12b-odroid-n2: enable DVFS Neil Armstrong
2019-06-28 18:13 ` [RFC/RFT v2 00/14] arm64: g12a: add support for DVFS Kevin Hilman
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=20190626090632.7540-4-narmstrong@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.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;
as well as URLs for NNTP newsgroup(s).