diff options
author | Mike Turquette <mturquette@linaro.org> | 2014-02-19 00:21:25 -0500 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-09-27 02:57:38 -0400 |
commit | e59c5371fb9d8268d1c043172e88cecab9dc934f (patch) | |
tree | 54acf05ccfffdc1dc17dd3c0adb92f54332e0bb0 /include/linux/clk-provider.h | |
parent | cfe4c93b58924b3764cd7269d3d953049405e938 (diff) |
clk: introduce clk_set_phase function & callback
A common operation for a clock signal generator is to shift the phase of
that signal. This patch introduces a new function to the clk.h API to
dynamically adjust the phase of a clock signal. Additionally this patch
introduces support for the new function in the common clock framework
via the .set_phase call back in struct clk_ops.
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r-- | include/linux/clk-provider.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 411dd7eb2653..201a6195a3eb 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
@@ -129,6 +129,10 @@ struct dentry; | |||
129 | * set then clock accuracy will be initialized to parent accuracy | 129 | * set then clock accuracy will be initialized to parent accuracy |
130 | * or 0 (perfect clock) if clock has no parent. | 130 | * or 0 (perfect clock) if clock has no parent. |
131 | * | 131 | * |
132 | * @set_phase: Shift the phase this clock signal in degrees specified | ||
133 | * by the second argument. Valid values for degrees are | ||
134 | * 0-359. Return 0 on success, otherwise -EERROR. | ||
135 | * | ||
132 | * @init: Perform platform-specific initialization magic. | 136 | * @init: Perform platform-specific initialization magic. |
133 | * This is not not used by any of the basic clock types. | 137 | * This is not not used by any of the basic clock types. |
134 | * Please consider other ways of solving initialization problems | 138 | * Please consider other ways of solving initialization problems |
@@ -177,6 +181,7 @@ struct clk_ops { | |||
177 | unsigned long parent_rate, u8 index); | 181 | unsigned long parent_rate, u8 index); |
178 | unsigned long (*recalc_accuracy)(struct clk_hw *hw, | 182 | unsigned long (*recalc_accuracy)(struct clk_hw *hw, |
179 | unsigned long parent_accuracy); | 183 | unsigned long parent_accuracy); |
184 | int (*set_phase)(struct clk_hw *hw, int degrees); | ||
180 | void (*init)(struct clk_hw *hw); | 185 | void (*init)(struct clk_hw *hw); |
181 | int (*debug_init)(struct clk_hw *hw, struct dentry *dentry); | 186 | int (*debug_init)(struct clk_hw *hw, struct dentry *dentry); |
182 | }; | 187 | }; |