zfs: fix missing include for disk_partition definition
[oweals/u-boot.git] / include / clk-uclass.h
index 07c10654955cb7bdb75f4d2a923a4c1b5cdf3ff0..dac42dab3681287bbe777a2effea7a25f5a1dfbf 100644 (file)
@@ -1,9 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (c) 2015 Google, Inc
  * Written by Simon Glass <sjg@chromium.org>
  * Copyright (c) 2016, NVIDIA CORPORATION.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef _CLK_UCLASS_H
@@ -12,7 +11,8 @@
 /* See clk.h for background documentation. */
 
 #include <clk.h>
-#include <fdtdec.h>
+
+struct ofnode_phandle_args;
 
 /**
  * struct clk_ops - The functions that a clock driver must implement.
@@ -37,7 +37,7 @@ struct clk_ops {
         * @return 0 if OK, or a negative error code.
         */
        int (*of_xlate)(struct clk *clock,
-                       struct fdtdec_phandle_args *args);
+                       struct ofnode_phandle_args *args);
        /**
         * request - Request a translated clock.
         *
@@ -53,14 +53,14 @@ struct clk_ops {
         */
        int (*request)(struct clk *clock);
        /**
-        * free - Free a previously requested clock.
+        * rfree - Free a previously requested clock.
         *
         * This is the implementation of the client clk_free() API.
         *
         * @clock:      The clock to free.
         * @return 0 if OK, or a negative error code.
         */
-       int (*free)(struct clk *clock);
+       int (*rfree)(struct clk *clock);
        /**
         * get_rate() - Get current clock rate.
         *
@@ -76,6 +76,14 @@ struct clk_ops {
         * @return new rate, or -ve error code.
         */
        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.
         *