diff options
author | Chen-Yu Tsai <wens@csie.org> | 2019-05-03 06:49:03 +0300 |
---|---|---|
committer | Chen-Yu Tsai <wens@csie.org> | 2019-06-18 14:38:59 +0300 |
commit | 2d6b4f33e637bf51c50c536966a19e94a59f3212 (patch) | |
tree | 07959a9b58a87f3c2413b13d4a2ce1325b9276f9 /include/linux/clk-provider.h | |
parent | 99600fd47eafd20b9ba6e04562bb2fcc48475344 (diff) | |
download | linux-2d6b4f33e637bf51c50c536966a19e94a59f3212.tar.xz |
clk: Add CLK_HW_INIT_FW_NAME macro using .fw_name in .parent_data
With the new clk parenting code, 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 clk_hw
pointers.
Add a CLK_HW_INIT macro for specifying a single parent from the device
tree using .fw_name in struct clk_parent_data.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r-- | include/linux/clk-provider.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 70aad5cefea7..b19063512a29 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -927,6 +927,17 @@ extern struct of_device_id __clk_of_table; .ops = _ops, \ }) +#define CLK_HW_INIT_FW_NAME(_name, _parent, _ops, _flags) \ + (&(struct clk_init_data) { \ + .flags = _flags, \ + .name = _name, \ + .parent_data = (const struct clk_parent_data[]) { \ + { .fw_name = _parent }, \ + }, \ + .num_parents = 1, \ + .ops = _ops, \ + }) + #define CLK_HW_INIT_PARENTS(_name, _parents, _ops, _flags) \ (&(struct clk_init_data) { \ .flags = _flags, \ |