1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * OF clock helpers
4  */
5 
6 #ifndef __LINUX_OF_CLK_H
7 #define __LINUX_OF_CLK_H
8 
9 #if defined(CONFIG_COMMON_CLK) && defined(CONFIG_OF)
10 
11 unsigned int of_clk_get_parent_count(struct device_node *np);
12 const char *of_clk_get_parent_name(struct device_node *np, int index);
13 void of_clk_init(const struct of_device_id *matches);
14 
15 #else /* !CONFIG_COMMON_CLK || !CONFIG_OF */
16 
of_clk_get_parent_count(struct device_node * np)17 static inline unsigned int of_clk_get_parent_count(struct device_node *np)
18 {
19 	return 0;
20 }
of_clk_get_parent_name(struct device_node * np,int index)21 static inline const char *of_clk_get_parent_name(struct device_node *np,
22 						 int index)
23 {
24 	return NULL;
25 }
of_clk_init(const struct of_device_id * matches)26 static inline void of_clk_init(const struct of_device_id *matches) {}
27 
28 #endif /* !CONFIG_COMMON_CLK || !CONFIG_OF */
29 
30 #endif /* __LINUX_OF_CLK_H */
31