feat(clk): add set_parent callback
This callback will be used to set a clock's parent if the underlying
clock driver supports this option.
Change-Id: Ie8a77d17dd3cc867bd520217b481cd188317a9c9
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 4cbc0f7..4395c3c 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -41,6 +41,13 @@
return ops->get_parent(id);
}
+int clk_set_parent(unsigned long id, unsigned long parent_id)
+{
+ assert((ops != NULL) && (ops->set_parent != NULL));
+
+ return ops->set_parent(id, parent_id);
+}
+
bool clk_is_enabled(unsigned long id)
{
assert((ops != NULL) && (ops->is_enabled != NULL));