summaryrefslogtreecommitdiff
path: root/include/clk.h
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2017-07-18 12:57:07 +0300
committerMarek Vasut <marex@denx.de>2017-07-29 00:34:08 +0300
commit82a8a669b4f7159f1f3c3251c2fcb36965896290 (patch)
tree6b52c69f258d57d59a86c76def7adeb2457bca51 /include/clk.h
parent3b9d1bdd4e5fe0c44e5d4d0a0916dbccc558749d (diff)
downloadu-boot-82a8a669b4f7159f1f3c3251c2fcb36965896290.tar.xz
clk: add clk_release_all()
Add clk_release_all() method which Disable/Free an array of clocks that has been previously requested by clk_request/get_by_*() Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/clk.h')
-rw-r--r--include/clk.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/clk.h b/include/clk.h
index 5a5c2ff1e6..a905a4143f 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -174,6 +174,20 @@ int clk_enable(struct clk *clk);
*/
int clk_disable(struct clk *clk);
+/**
+ * clk_release_all() - Disable (turn off)/Free an array of previously
+ * requested clocks.
+ *
+ * For each clock contained in the clock array, this function will check if
+ * clock has been previously requested and then will disable and free it.
+ *
+ * @clk: A clock struct array that was previously successfully
+ * requested by clk_request/get_by_*().
+ * @count Number of clock contained in the array
+ * @return zero on success, or -ve error code.
+ */
+int clk_release_all(struct clk *clk, int count);
+
int soc_clk_dump(void);
#endif