From f7d1046da18fd03a047b5f4d290a8ab8550ebf73 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Mon, 8 Jan 2018 11:15:08 +0100 Subject: 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 Tested-by: David Wu Series-changes: 2 - Fixed David's email address. --- include/clk-uclass.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/clk-uclass.h') diff --git a/include/clk-uclass.h b/include/clk-uclass.h index e7ea334..75933eb 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. -- cgit v1.1