diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clk-provider.h | 8 | ||||
| -rw-r--r-- | include/linux/clk.h | 14 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 939533da93a7..511917416fb0 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #define CLK_GET_ACCURACY_NOCACHE BIT(8) /* do not use the cached clk accuracy */ | 32 | #define CLK_GET_ACCURACY_NOCACHE BIT(8) /* do not use the cached clk accuracy */ |
| 33 | 33 | ||
| 34 | struct clk_hw; | 34 | struct clk_hw; |
| 35 | struct dentry; | ||
| 35 | 36 | ||
| 36 | /** | 37 | /** |
| 37 | * struct clk_ops - Callback operations for hardware clocks; these are to | 38 | * struct clk_ops - Callback operations for hardware clocks; these are to |
| @@ -127,6 +128,12 @@ struct clk_hw; | |||
| 127 | * separately via calls to .set_parent and .set_rate. | 128 | * separately via calls to .set_parent and .set_rate. |
| 128 | * Returns 0 on success, -EERROR otherwise. | 129 | * Returns 0 on success, -EERROR otherwise. |
| 129 | * | 130 | * |
| 131 | * @debug_init: Set up type-specific debugfs entries for this clock. This | ||
| 132 | * is called once, after the debugfs directory entry for this | ||
| 133 | * clock has been created. The dentry pointer representing that | ||
| 134 | * directory is provided as an argument. Called with | ||
| 135 | * prepare_lock held. Returns 0 on success, -EERROR otherwise. | ||
| 136 | * | ||
| 130 | * | 137 | * |
| 131 | * The clk_enable/clk_disable and clk_prepare/clk_unprepare pairs allow | 138 | * The clk_enable/clk_disable and clk_prepare/clk_unprepare pairs allow |
| 132 | * implementations to split any work between atomic (enable) and sleepable | 139 | * implementations to split any work between atomic (enable) and sleepable |
| @@ -165,6 +172,7 @@ struct clk_ops { | |||
| 165 | unsigned long (*recalc_accuracy)(struct clk_hw *hw, | 172 | unsigned long (*recalc_accuracy)(struct clk_hw *hw, |
| 166 | unsigned long parent_accuracy); | 173 | unsigned long parent_accuracy); |
| 167 | void (*init)(struct clk_hw *hw); | 174 | void (*init)(struct clk_hw *hw); |
| 175 | int (*debug_init)(struct clk_hw *hw, struct dentry *dentry); | ||
| 168 | }; | 176 | }; |
| 169 | 177 | ||
| 170 | /** | 178 | /** |
diff --git a/include/linux/clk.h b/include/linux/clk.h index 0dd91148165e..fb5e097d8f72 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h | |||
| @@ -78,8 +78,22 @@ struct clk_notifier_data { | |||
| 78 | unsigned long new_rate; | 78 | unsigned long new_rate; |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | /** | ||
| 82 | * clk_notifier_register: register a clock rate-change notifier callback | ||
| 83 | * @clk: clock whose rate we are interested in | ||
| 84 | * @nb: notifier block with callback function pointer | ||
| 85 | * | ||
| 86 | * ProTip: debugging across notifier chains can be frustrating. Make sure that | ||
| 87 | * your notifier callback function prints a nice big warning in case of | ||
| 88 | * failure. | ||
| 89 | */ | ||
| 81 | int clk_notifier_register(struct clk *clk, struct notifier_block *nb); | 90 | int clk_notifier_register(struct clk *clk, struct notifier_block *nb); |
| 82 | 91 | ||
| 92 | /** | ||
| 93 | * clk_notifier_unregister: unregister a clock rate-change notifier callback | ||
| 94 | * @clk: clock whose rate we are no longer interested in | ||
| 95 | * @nb: notifier block which will be unregistered | ||
| 96 | */ | ||
| 83 | int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb); | 97 | int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb); |
| 84 | 98 | ||
| 85 | /** | 99 | /** |
