|
@@ -3016,6 +3016,27 @@ const char *of_clk_get_parent_name(struct device_node *np, int index)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(of_clk_get_parent_name);
|
|
EXPORT_SYMBOL_GPL(of_clk_get_parent_name);
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * of_clk_parent_fill() - Fill @parents with names of @np's parents and return
|
|
|
|
+ * number of parents
|
|
|
|
+ * @np: Device node pointer associated with clock provider
|
|
|
|
+ * @parents: pointer to char array that hold the parents' names
|
|
|
|
+ * @size: size of the @parents array
|
|
|
|
+ *
|
|
|
|
+ * Return: number of parents for the clock node.
|
|
|
|
+ */
|
|
|
|
+int of_clk_parent_fill(struct device_node *np, const char **parents,
|
|
|
|
+ unsigned int size)
|
|
|
|
+{
|
|
|
|
+ unsigned int i = 0;
|
|
|
|
+
|
|
|
|
+ while (i < size && (parents[i] = of_clk_get_parent_name(np, i)) != NULL)
|
|
|
|
+ i++;
|
|
|
|
+
|
|
|
|
+ return i;
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL_GPL(of_clk_parent_fill);
|
|
|
|
+
|
|
struct clock_provider {
|
|
struct clock_provider {
|
|
of_clk_init_cb_t clk_init_cb;
|
|
of_clk_init_cb_t clk_init_cb;
|
|
struct device_node *np;
|
|
struct device_node *np;
|