diff options
author | Chen-Yu Tsai <wens@csie.org> | 2019-04-22 07:19:46 +0800 |
---|---|---|
committer | Chen-Yu Tsai <wens@csie.org> | 2019-06-18 19:39:00 +0800 |
commit | d7b15114aba956ca395ec5cc28f68fe861ffc208 (patch) | |
tree | d39b673b7cf772484848b172f41045fc7f436c9e /include/linux/clk-provider.h | |
parent | 13933109dff0a5abbfc3980304c6c21c90829810 (diff) | |
download | linux-d7b15114aba956ca395ec5cc28f68fe861ffc208.tar.gz linux-d7b15114aba956ca395ec5cc28f68fe861ffc208.tar.bz2 linux-d7b15114aba956ca395ec5cc28f68fe861ffc208.zip |
clk: fixed-factor: Add CLK_FIXED_FACTOR_HW which takes clk_hw pointer as parent
With the new clk parenting code, clk_init_data was expanded to include
.parent_hws, for clk drivers to directly reference parents by clk_hw.
Add a new macro, CLK_FIXED_FACTOR_HW, that can take a struct clk_hw
pointer, instead of a string, as its parent.
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 0fd14c4874d6..c85e9f3809f2 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -985,6 +985,17 @@ extern struct of_device_id __clk_of_table; _flags), \ } +#define CLK_FIXED_FACTOR_HW(_struct, _name, _parent, \ + _div, _mult, _flags) \ + struct clk_fixed_factor _struct = { \ + .div = _div, \ + .mult = _mult, \ + .hw.init = CLK_HW_INIT_HW(_name, \ + _parent, \ + &clk_fixed_factor_ops, \ + _flags), \ + } + #ifdef CONFIG_OF int of_clk_add_provider(struct device_node *np, struct clk *(*clk_src_get)(struct of_phandle_args *args, |