aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorSowjanya Komatineni <skomatineni@nvidia.com>2019-08-16 12:41:52 -0700
committerThierry Reding <treding@nvidia.com>2019-11-11 13:59:35 +0100
commitd9b86cc48283112f06738d45031b88bd3f9ecb92 (patch)
treeeeb57670a444e3530d37377db2b4583fb33bd241 /include/linux/clk-provider.h
parentLinux 5.4-rc1 (diff)
downloadwireguard-linux-d9b86cc48283112f06738d45031b88bd3f9ecb92.tar.xz
wireguard-linux-d9b86cc48283112f06738d45031b88bd3f9ecb92.zip
clk: Add API to get index of the clock parent
This patch adds a new clk_hw_get_parent_index() function that can be used to retrieve the index of a given clock's parent. This can be useful for restoring a clock on system resume. Reviewed-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 2fdfe8061363..caf4b9df16eb 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -818,6 +818,7 @@ unsigned int clk_hw_get_num_parents(const struct clk_hw *hw);
struct clk_hw *clk_hw_get_parent(const struct clk_hw *hw);
struct clk_hw *clk_hw_get_parent_by_index(const struct clk_hw *hw,
unsigned int index);
+int clk_hw_get_parent_index(struct clk_hw *hw);
int clk_hw_set_parent(struct clk_hw *hw, struct clk_hw *new_parent);
unsigned int __clk_get_enable_count(struct clk *clk);
unsigned long clk_hw_get_rate(const struct clk_hw *hw);