aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2019-04-22 07:17:50 +0800
committerChen-Yu Tsai <wens@csie.org>2019-06-18 19:38:59 +0800
commit13933109dff0a5abbfc3980304c6c21c90829810 (patch)
treefeb1b1b8653ad0f578dbb2f0401643611d24b5c4 /include/linux/clk-provider.h
parentclk: Add CLK_HW_INIT_FW_NAME macro using .fw_name in .parent_data (diff)
downloadlinux-dev-13933109dff0a5abbfc3980304c6c21c90829810.tar.xz
linux-dev-13933109dff0a5abbfc3980304c6c21c90829810.zip
clk: Add CLK_HW_INIT_PARENT_DATA macro using .parent_data
With the new clk parenting code, struct clk_init_data was expanded to include .parent_data, for clk drivers that have parents referenced using a combination of device tree clock-names, clock indices, and/or struct clk_hw pointers. Add a new macro that can take a list of struct clk_parent_data for drivers to use. Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index b19063512a29..0fd14c4874d6 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -956,6 +956,15 @@ extern struct of_device_id __clk_of_table;
.ops = _ops, \
})
+#define CLK_HW_INIT_PARENTS_DATA(_name, _parents, _ops, _flags) \
+ (&(struct clk_init_data) { \
+ .flags = _flags, \
+ .name = _name, \
+ .parent_data = _parents, \
+ .num_parents = ARRAY_SIZE(_parents), \
+ .ops = _ops, \
+ })
+
#define CLK_HW_INIT_NO_PARENT(_name, _ops, _flags) \
(&(struct clk_init_data) { \
.flags = _flags, \