clk: fixed-factor: add fwname-based constructor functions
authorThéo Lebrun <theo.lebrun@bootlin.com>
Wed, 21 Feb 2024 18:22:10 +0000 (19:22 +0100)
committerStephen Boyd <sboyd@kernel.org>
Thu, 22 Feb 2024 06:11:51 +0000 (22:11 -0800)
commitae156a3633d377d43990eb539f8a007c0c2bf769
tree9ac270d89521bcfe86963479955b492fae82056e
parentff773fd2199960ffab0caae07451fe0f12b05bb8
clk: fixed-factor: add fwname-based constructor functions

Add four functions to register clk_hw based on the fw_name field in
clk_parent_data, ie the value in the DT property `clock-names`.

There are variants for devm or not and passing an accuracy or not
passing one:

 - clk_hw_register_fixed_factor_fwname
 - clk_hw_register_fixed_factor_with_accuracy_fwname
 - devm_clk_hw_register_fixed_factor_fwname
 - devm_clk_hw_register_fixed_factor_with_accuracy_fwname

The `struct clk_parent_data` init is extracted from
__clk_hw_register_fixed_factor to each calling function. It is required
to allow each function to pass whatever field they want, not only index.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://lore.kernel.org/r/20240221-mbly-clk-v7-2-31d4ce3630c3@bootlin.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-fixed-factor.c
include/linux/clk-provider.h