diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clk-provider.h | 14 | ||||
| -rw-r--r-- | include/linux/clk.h | 19 |
2 files changed, 33 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 06ad617664a2..7c9c691102b5 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -347,5 +347,19 @@ void __clk_unprepare(struct clk *clk); | |||
| 347 | void __clk_reparent(struct clk *clk, struct clk *new_parent); | 347 | void __clk_reparent(struct clk *clk, struct clk *new_parent); |
| 348 | unsigned long __clk_round_rate(struct clk *clk, unsigned long rate); | 348 | unsigned long __clk_round_rate(struct clk *clk, unsigned long rate); |
| 349 | 349 | ||
| 350 | struct of_device_id; | ||
| 351 | |||
| 352 | typedef void (*of_clk_init_cb_t)(struct device_node *); | ||
| 353 | |||
| 354 | int of_clk_add_provider(struct device_node *np, | ||
| 355 | struct clk *(*clk_src_get)(struct of_phandle_args *args, | ||
| 356 | void *data), | ||
| 357 | void *data); | ||
| 358 | void of_clk_del_provider(struct device_node *np); | ||
| 359 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, | ||
| 360 | void *data); | ||
| 361 | const char *of_clk_get_parent_name(struct device_node *np, int index); | ||
| 362 | void of_clk_init(const struct of_device_id *matches); | ||
| 363 | |||
| 350 | #endif /* CONFIG_COMMON_CLK */ | 364 | #endif /* CONFIG_COMMON_CLK */ |
| 351 | #endif /* CLK_PROVIDER_H */ | 365 | #endif /* CLK_PROVIDER_H */ |
diff --git a/include/linux/clk.h b/include/linux/clk.h index ad5c43e8ae8a..8b70342e7e0b 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h | |||
| @@ -310,4 +310,23 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id); | |||
| 310 | int clk_add_alias(const char *alias, const char *alias_dev_name, char *id, | 310 | int clk_add_alias(const char *alias, const char *alias_dev_name, char *id, |
| 311 | struct device *dev); | 311 | struct device *dev); |
| 312 | 312 | ||
| 313 | struct device_node; | ||
| 314 | struct of_phandle_args; | ||
| 315 | |||
| 316 | #ifdef CONFIG_OF | ||
| 317 | struct clk *of_clk_get(struct device_node *np, int index); | ||
| 318 | struct clk *of_clk_get_by_name(struct device_node *np, const char *name); | ||
| 319 | struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec); | ||
| 320 | #else | ||
| 321 | static inline struct clk *of_clk_get(struct device_node *np, int index) | ||
| 322 | { | ||
| 323 | return NULL; | ||
| 324 | } | ||
| 325 | static inline struct clk *of_clk_get_by_name(struct device_node *np, | ||
| 326 | const char *name) | ||
| 327 | { | ||
| 328 | return NULL; | ||
| 329 | } | ||
| 330 | #endif | ||
| 331 | |||
| 313 | #endif | 332 | #endif |
