summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorTomeu Vizoso2015-03-11 11:34:25 +0100
committerThierry Reding2015-05-13 15:17:08 +0200
commit42c86547f4e5c2e81616c76ce9a2badce515c41f (patch)
treeb95a89f8eacfe6ec20ea7efe9c538161d8977d1d /drivers/clk/clk.c
parentMerge branch 'for-4.2/ramcode' into for-4.2/clk (diff)
downloadkernel-qcow2-linux-42c86547f4e5c2e81616c76ce9a2badce515c41f.tar.gz
kernel-qcow2-linux-42c86547f4e5c2e81616c76ce9a2badce515c41f.tar.xz
kernel-qcow2-linux-42c86547f4e5c2e81616c76ce9a2badce515c41f.zip
clk: Expose clk_hw_reparent() to providers
To be used by clock implementations for switching to a new parent during rate change. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 459ce9da13e0..5315a273eae9 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2020,6 +2020,14 @@ static void clk_core_reparent(struct clk_core *clk,
__clk_recalc_rates(clk, POST_RATE_CHANGE);
}
+void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent)
+{
+ if (!hw)
+ return;
+
+ clk_core_reparent(hw->core, !new_parent ? NULL : new_parent->core);
+}
+
/**
* clk_has_parent - check if a clock is a possible parent for another
* @clk: clock source