return ops->set_rate(clk, rate);
}
+int clk_set_parent(struct clk *clk, struct clk *parent)
+{
+ const struct clk_ops *ops = clk_dev_ops(clk->dev);
+
+ debug("%s(clk=%p, parent=%p)\n", __func__, clk, parent);
+
+ if (!ops->set_parent)
+ return -ENOSYS;
+
+ return ops->set_parent(clk, parent);
+}
+
int clk_enable(struct clk *clk)
{
const struct clk_ops *ops = clk_dev_ops(clk->dev);
* @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.
*
*/
ulong clk_set_rate(struct clk *clk, ulong rate);
+/**
+ * clk_set_parent() - Set current clock parent.
+ *
+ * @clk: A clock struct that was previously successfully requested by
+ * clk_request/get_by_*().
+ * @parent: A clock struct that was previously successfully requested by
+ * clk_request/get_by_*().
+ * @return new rate, or -ve error code.
+ */
+int clk_set_parent(struct clk *clk, struct clk *parent);
+
/**
* clk_enable() - Enable (turn on) a clock.
*