pinctrl: add support for MediaTek MT7628
[oweals/u-boot.git] / include / clk.h
index 2ebc905e04b5545c67df9e1a8f95267adde07f3d..18b2e3ca54c53ab37d2ac743d9327b7c71424dc0 100644 (file)
@@ -61,6 +61,7 @@ struct clk {
        struct udevice *dev;
        long long rate; /* in HZ */
        u32 flags;
+       int enable_count;
        /*
         * Written by of_xlate. In the future, we might add more fields here.
         */
@@ -333,6 +334,18 @@ int clk_disable(struct clk *clk);
  */
 int clk_disable_bulk(struct clk_bulk *bulk);
 
+/**
+ * clk_is_match - check if two clk's point to the same hardware clock
+ * @p: clk compared against q
+ * @q: clk compared against p
+ *
+ * Returns true if the two struct clk pointers both point to the same hardware
+ * clock node.
+ *
+ * Returns false otherwise. Note that two NULL clks are treated as matching.
+ */
+bool clk_is_match(const struct clk *p, const struct clk *q);
+
 int soc_clk_dump(void);
 
 /**