From a597043304a13defc646bb1f16514e4903b36c3c Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 10 Apr 2018 15:06:05 +0200 Subject: clk: Remove clk_init_cb typedef Since commit c08ee14cc6634457 ("clk: ti: change clock init to use generic of_clk_init"), there is only a single (private) user left of the (public) clk_init_cb typedef. Hence expand its single user in the core clock code, and remove the typedef. Signed-off-by: Geert Uytterhoeven Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1523365565-17124-1-git-send-email-geert+renesas@glider.be --- include/linux/clk-provider.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/linux/clk-provider.h') diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 210a890008f9..410a8627b8c0 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -802,8 +802,6 @@ unsigned long clk_hw_round_rate(struct clk_hw *hw, unsigned long rate); struct of_device_id; -typedef void (*of_clk_init_cb_t)(struct device_node *); - struct clk_onecell_data { struct clk **clks; unsigned int clk_num; -- cgit v1.2.3 From eb06d6bbc45a7561de78a00fb17bfbb75893ee26 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 18 Apr 2018 16:50:01 +0200 Subject: clk: Extract OF clock helpers in The use of of_clk_get_parent_{count,name}() and of_clk_init() is not limited to clock providers. Hence move these helpers into their own header file, so callers that are not clock providers no longer have to include . Suggested-by: Stephen Boyd Signed-off-by: Geert Uytterhoeven Reviewed-by: Heiko Stuebner Signed-off-by: Stephen Boyd --- include/linux/clk-provider.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'include/linux/clk-provider.h') diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 210a890008f9..61cb4729f22a 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -13,6 +13,7 @@ #include #include +#include #ifdef CONFIG_COMMON_CLK @@ -890,13 +891,10 @@ struct clk_hw *of_clk_hw_simple_get(struct of_phandle_args *clkspec, struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); struct clk_hw *of_clk_hw_onecell_get(struct of_phandle_args *clkspec, void *data); -unsigned int of_clk_get_parent_count(struct device_node *np); int of_clk_parent_fill(struct device_node *np, const char **parents, unsigned int size); -const char *of_clk_get_parent_name(struct device_node *np, int index); int of_clk_detect_critical(struct device_node *np, int index, unsigned long *flags); -void of_clk_init(const struct of_device_id *matches); #else /* !CONFIG_OF */ @@ -943,26 +941,16 @@ of_clk_hw_onecell_get(struct of_phandle_args *clkspec, void *data) { return ERR_PTR(-ENOENT); } -static inline unsigned int of_clk_get_parent_count(struct device_node *np) -{ - return 0; -} static inline int of_clk_parent_fill(struct device_node *np, const char **parents, unsigned int size) { return 0; } -static inline const char *of_clk_get_parent_name(struct device_node *np, - int index) -{ - return NULL; -} static inline int of_clk_detect_critical(struct device_node *np, int index, unsigned long *flags) { return 0; } -static inline void of_clk_init(const struct of_device_id *matches) {} #endif /* CONFIG_OF */ /* -- cgit v1.2.3 From c1c2873df06372a108976599583eba7e47483379 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 29 May 2018 18:08:04 +0200 Subject: clk: remove clk_debugfs_add_file() No one was using this api call, so remove it. If it is ever needed in the future, a "raw" debugfs call can be used. Cc: Michael Turquette Cc: Stephen Boyd Signed-off-by: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- include/linux/clk-provider.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include/linux/clk-provider.h') diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 210a890008f9..00e55d4d07f1 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -996,10 +996,5 @@ static inline void clk_writel(u32 val, u32 __iomem *reg) #endif /* platform dependent I/O accessors */ -#ifdef CONFIG_DEBUG_FS -struct dentry *clk_debugfs_add_file(struct clk_hw *hw, char *name, umode_t mode, - void *data, const struct file_operations *fops); -#endif - #endif /* CONFIG_COMMON_CLK */ #endif /* CLK_PROVIDER_H */ -- cgit v1.2.3 From d75d50c016a4eff96e004921402128dc2bc3d65b Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Fri, 1 Jun 2018 21:42:07 -0700 Subject: clk: Return void from debug_init op We only have two users of the debug_init hook, and we recently stopped caring about the return value from that op. Finish that off by changing the clk_op to return void instead of int because it doesn't matter if debugfs fails or not. Cc: Eric Anholt Cc: David Lechner Cc: Sekhar Nori Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- include/linux/clk-provider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/clk-provider.h') diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 00e55d4d07f1..a4dc15afbdaf 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -218,7 +218,7 @@ struct clk_ops { int (*get_phase)(struct clk_hw *hw); int (*set_phase)(struct clk_hw *hw, int degrees); void (*init)(struct clk_hw *hw); - int (*debug_init)(struct clk_hw *hw, struct dentry *dentry); + void (*debug_init)(struct clk_hw *hw, struct dentry *dentry); }; /** -- cgit v1.2.3