summaryrefslogtreecommitdiff
path: root/include/clk.h
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2019-07-31 07:01:23 +0000
committerLukasz Majewski <lukma@denx.de>2019-07-31 09:20:51 +0200
commit2457612d6d374bd67d3317f11cf24fc0bba02274 (patch)
tree9d5d91776eeb330d7fe1677b465f6b68940a563c /include/clk.h
parent75551c8bfc9545e31ec2ce238cac3857904007b8 (diff)
downloadu-boot-2457612d6d374bd67d3317f11cf24fc0bba02274.tar.gz
clk: introduce clk_dev_binded
When support Clock Common Framework, U-Boot use dev for clk tree information, there is no clk->parent. When support composite clk, it contains mux/gate/divider, but the mux/gate/divider is not binded with device. So we could not use dev_get_uclass_priv to get the correct clk_mux/gate/divider. So add clk_dev_binded to let choose the correct method. Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'include/clk.h')
-rw-r--r--include/clk.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/clk.h b/include/clk.h
index f8f56d9cf0..2ebc905e04 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -356,4 +356,13 @@ static inline bool clk_valid(struct clk *clk)
* @return zero on success, or -ENOENT on error
*/
int clk_get_by_id(ulong id, struct clk **clkp);
+
+/**
+ * clk_dev_binded() - Check whether the clk has a device binded
+ *
+ * @clk A pointer to the clk
+ *
+ * @return true on binded, or false on no
+ */
+bool clk_dev_binded(struct clk *clk);
#endif