diff options
author | Neil Armstrong <narmstrong@baylibre.com> | 2019-07-31 10:40:16 +0200 |
---|---|---|
committer | Jerome Brunet <jbrunet@baylibre.com> | 2019-08-09 12:09:52 +0200 |
commit | 3567894b6914813299300019e028874927210880 (patch) | |
tree | 8c9234bf93c94717e616074cd966e585e88eedec /drivers/clk | |
parent | e96c7612315a1183e12d5b6ebd523a3a93617510 (diff) |
clk: core: introduce clk_hw_set_parent()
Introduce the clk_hw_set_parent() provider call to change parent of
a clock by using the clk_hw pointers.
This eases the clock reparenting from clock rate notifiers and
implementing DVFS with simpler code avoiding the boilerplates
functions as __clk_lookup(clk_hw_get_name()) then clk_set_parent().
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index c0990703ce54..c11b1781d24a 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2487,6 +2487,12 @@ runtime_put: return ret; } +int clk_hw_set_parent(struct clk_hw *hw, struct clk_hw *parent) +{ + return clk_core_set_parent_nolock(hw->core, parent->core); +} +EXPORT_SYMBOL_GPL(clk_hw_set_parent); + /** * clk_set_parent - switch the parent of a mux clk * @clk: the mux clk whose input we are switching |