[PATCH 1/2] clk: fixed-rate: add devm_clk_hw_register_fixed_rate
Stephen Boyd
sboyd at kernel.org
Thu Jun 23 18:10:50 PDT 2022
Quoting Dmitry Baryshkov (2022-06-20 08:39:55)
> Add devm_clk_hw_register_fixed_rate(), devres-managed helper to register
> fixed-rate clock.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> ---
> drivers/clk/clk-asm9260.c | 2 +-
> drivers/clk/clk-fixed-rate.c | 28 ++++++++++++++++++++++++----
> include/linux/clk-provider.h | 27 ++++++++++++++++++++-------
> 3 files changed, 45 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/clk/clk-asm9260.c b/drivers/clk/clk-asm9260.c
> index bacebd457e6f..4da5f38249bf 100644
> --- a/drivers/clk/clk-asm9260.c
> +++ b/drivers/clk/clk-asm9260.c
> @@ -278,7 +278,7 @@ static void __init asm9260_acc_init(struct device_node *np)
> ref_clk = of_clk_get_parent_name(np, 0);
> hw = __clk_hw_register_fixed_rate(NULL, NULL, pll_clk,
> ref_clk, NULL, NULL, 0, rate, 0,
> - CLK_FIXED_RATE_PARENT_ACCURACY);
> + CLK_FIXED_RATE_PARENT_ACCURACY, false);
Can you also make this usage into a macro so that it doesn't change in
the future when a new argument is added?
>
> if (IS_ERR(hw))
> panic("%pOFn: can't register REFCLK. Check DT!", np);
More information about the linux-phy
mailing list