summaryrefslogtreecommitdiff
path: root/include/clk-uclass.h
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2018-01-08 11:15:08 +0100
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2018-01-28 17:12:35 +0100
commitf7d1046da18fd03a047b5f4d290a8ab8550ebf73 (patch)
tree308343715a5434f6442d81c29e8c618d06f08923 /include/clk-uclass.h
parent1a7f6d4597646662022f3e67ceaaeff7a23459e5 (diff)
clk: add clk_set_parent()
Clocks may support multiple parents: this change introduces an optional operation on the clk-uclass to set a clock's parent. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: David Wu <david.wu@rock-chips.com> Series-changes: 2 - Fixed David's email address.
Diffstat (limited to 'include/clk-uclass.h')
-rw-r--r--include/clk-uclass.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/clk-uclass.h b/include/clk-uclass.h
index e7ea334c60..75933eb884 100644
--- a/include/clk-uclass.h
+++ b/include/clk-uclass.h
@@ -78,6 +78,14 @@ struct clk_ops {
*/
ulong (*set_rate)(struct clk *clk, ulong rate);
/**
+ * set_parent() - Set current clock parent
+ *
+ * @clk: The clock to manipulate.
+ * @parent: New clock parent.
+ * @return zero on success, or -ve error code.
+ */
+ int (*set_parent)(struct clk *clk, struct clk *parent);
+ /**
* enable() - Enable a clock.
*
* @clk: The clock to manipulate.