summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSean Anderson <[email protected]>2022-03-20 16:34:45 -0400
committerSean Anderson <[email protected]>2022-03-30 13:03:29 -0400
commit3a11b5ae65c269ef9f7bb1e18826e85fc164f161 (patch)
treeb1705a82741c8cecd63f88a6506b54f0aec7f7db /include/linux
parente7075ff7b3dce82e4fd6246b87f3c44fabf6323b (diff)
clk: ccf: Add some helper functions for clock ops
Most CCF drivers follow a common pattern where their clock ops defer the actual operation to the backing CCF clock. Add some generic implementations of these functions to reduce duplication of code. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clk-provider.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 9a6116646de..2d04882d053 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -254,4 +254,12 @@ const char *clk_hw_get_name(const struct clk *hw);
ulong clk_generic_get_rate(struct clk *clk);
struct clk *dev_get_clk_ptr(struct udevice *dev);
+
+ulong ccf_clk_get_rate(struct clk *clk);
+ulong ccf_clk_set_rate(struct clk *clk, unsigned long rate);
+int ccf_clk_set_parent(struct clk *clk, struct clk *parent);
+int ccf_clk_enable(struct clk *clk);
+int ccf_clk_disable(struct clk *clk);
+extern const struct clk_ops ccf_clk_ops;
+
#endif /* __LINUX_CLK_PROVIDER_H */