Sylwester Nawrocki | d6782c2 | 2013-08-23 17:03:43 +0200 | [diff] [blame] | 1 | /* |
| 2 | * linux/drivers/clk/clk.h |
| 3 | * |
| 4 | * Copyright (C) 2013 Samsung Electronics Co., Ltd. |
| 5 | * Sylwester Nawrocki <s.nawrocki@samsung.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | */ |
| 11 | |
Tomeu Vizoso | 035a61c | 2015-01-23 12:03:30 +0100 | [diff] [blame] | 12 | struct clk_hw; |
Taniya Das | a5aadd7 | 2017-01-23 12:24:10 +0530 | [diff] [blame] | 13 | struct clk_core; |
Tomeu Vizoso | 035a61c | 2015-01-23 12:03:30 +0100 | [diff] [blame] | 14 | |
Shefali Jain | 0dc6e78 | 2017-11-27 13:06:27 +0530 | [diff] [blame^] | 15 | #if defined(CONFIG_OF) |
Stephen Boyd | 73e0e49 | 2015-02-06 11:42:43 -0800 | [diff] [blame] | 16 | struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec, |
| 17 | const char *dev_id, const char *con_id); |
Sylwester Nawrocki | d6782c2 | 2013-08-23 17:03:43 +0200 | [diff] [blame] | 18 | #endif |
Tomeu Vizoso | 035a61c | 2015-01-23 12:03:30 +0100 | [diff] [blame] | 19 | |
Stephen Boyd | 73e0e49 | 2015-02-06 11:42:43 -0800 | [diff] [blame] | 20 | #ifdef CONFIG_COMMON_CLK |
Tomeu Vizoso | 035a61c | 2015-01-23 12:03:30 +0100 | [diff] [blame] | 21 | struct clk *__clk_create_clk(struct clk_hw *hw, const char *dev_id, |
| 22 | const char *con_id); |
Stephen Boyd | 73e0e49 | 2015-02-06 11:42:43 -0800 | [diff] [blame] | 23 | void __clk_free_clk(struct clk *clk); |
Taniya Das | 6c15e54 | 2016-11-07 10:08:30 +0530 | [diff] [blame] | 24 | |
| 25 | /* Debugfs API to print the enabled clocks */ |
Shefali Jain | 5c15a99 | 2017-09-20 16:01:01 +0530 | [diff] [blame] | 26 | void clock_debug_print_enabled(bool print_parent); |
Taniya Das | 8436bd7 | 2016-11-21 17:50:13 +0530 | [diff] [blame] | 27 | void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f); |
Taniya Das | 6c15e54 | 2016-11-07 10:08:30 +0530 | [diff] [blame] | 28 | |
Stephen Boyd | 73e0e49 | 2015-02-06 11:42:43 -0800 | [diff] [blame] | 29 | #else |
| 30 | /* All these casts to avoid ifdefs in clkdev... */ |
| 31 | static inline struct clk * |
| 32 | __clk_create_clk(struct clk_hw *hw, const char *dev_id, const char *con_id) |
| 33 | { |
| 34 | return (struct clk *)hw; |
| 35 | } |
| 36 | static inline void __clk_free_clk(struct clk *clk) { } |
| 37 | static struct clk_hw *__clk_get_hw(struct clk *clk) |
| 38 | { |
| 39 | return (struct clk_hw *)clk; |
| 40 | } |
| 41 | |
| 42 | #endif |