[PATCH v3 05/10] linux: clk: add clk_parent_data
Steffen Trumtrar
s.trumtrar at pengutronix.de
Mon Jun 23 06:57:50 PDT 2025
Some linux clock drivers use the clk_parent_data struct.
Import it from linux to make driver porting easier.
Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
---
include/linux/clk.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 7ae4c48ca27ffbe4597eede01fca27ddee9772d1..a1af7d57779769a070de1b56f2cda9ed23da2571 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -349,6 +349,20 @@ struct clk_ops {
int (*get_phase)(struct clk_hw *hw);
};
+/**
+ * struct clk_parent_data - clk parent information
+ * @hw: parent clk_hw pointer (used for clk providers with internal clks)
+ * @fw_name: parent name local to provider registering clk
+ * @name: globally unique parent name (used as a fallback)
+ * @index: parent index local to provider registering clk (if @fw_name absent)
+ */
+struct clk_parent_data {
+ const struct clk_hw *hw;
+ const char *fw_name;
+ const char *name;
+ int index;
+};
+
/**
* struct clk_init_data - holds init data that's common to all clocks and is
* shared between the clock provider and the common clock framework.
@@ -365,6 +379,7 @@ struct clk_init_data {
const char *name;
const struct clk_ops *ops;
const char * const *parent_names;
+ const struct clk_parent_data *parent_data;
const struct clk_hw **parent_hws;
unsigned int num_parents;
unsigned long flags;
--
2.46.0
More information about the barebox
mailing list