lkml.org 
[lkml]   [2019]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/4] clk: meson: mpll: add init callback and regs
Date
Quoting Jerome Brunet (2019-03-25 04:11:57)
> @@ -138,6 +129,27 @@ static int mpll_set_rate(struct clk_hw *hw,
> return 0;
> }
>
> +static void mpll_init(struct clk_hw *hw)
> +{
> + struct clk_regmap *clk = to_clk_regmap(hw);
> + struct meson_clk_mpll_data *mpll = meson_clk_mpll_data(clk);
> +
> + if (mpll->init_count)
> + regmap_multi_reg_write(clk->map, mpll->init_regs,
> + mpll->init_count);
> +
> + /* Enable the fractional part */
> + meson_parm_write(clk->map, &mpll->sdm_en, 1);
> +
> + /* Set additional fractional part enable if required */
> + if (MESON_PARM_APPLICABLE(&mpll->ssen))
> + meson_parm_write(clk->map, &mpll->ssen, 1);
> +
> + /* Set the magic misc bit if required */
> + if (MESON_PARM_APPLICABLE(&mpll->misc))
> + meson_parm_write(clk->map, &mpll->misc, 1);
> +}
> +
> const struct clk_ops meson_clk_mpll_ro_ops = {
> .recalc_rate = mpll_recalc_rate,
> .round_rate = mpll_round_rate,
> @@ -148,6 +160,7 @@ const struct clk_ops meson_clk_mpll_ops = {
> .recalc_rate = mpll_recalc_rate,
> .round_rate = mpll_round_rate,
> .set_rate = mpll_set_rate,
> + .init = mpll_init,

We actively discourage using init callbacks. Can you do this some other
way?

> };
> EXPORT_SYMBOL_GPL(meson_clk_mpll_ops);
>

\
 
 \ /
  Last update: 2019-03-25 18:11    [W:0.074 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site