Lines Matching refs:div_factor
38 static inline unsigned int div_factor_to_div(unsigned int div_factor) in div_factor_to_div() argument
40 if (!div_factor) in div_factor_to_div()
41 div_factor = 1; in div_factor_to_div()
43 return 1 << (div_factor - 1); in div_factor_to_div()
62 unsigned int div_factor) in __spmi_pmic_clkdiv_set_enable_state() argument
66 unsigned int div = div_factor_to_div(div_factor); in __spmi_pmic_clkdiv_set_enable_state()
83 unsigned int div_factor; in spmi_pmic_clkdiv_set_enable_state() local
85 regmap_read(clkdiv->regmap, clkdiv->base + REG_DIV_CTL1, &div_factor); in spmi_pmic_clkdiv_set_enable_state()
86 div_factor &= DIV_CTL1_DIV_FACTOR_MASK; in spmi_pmic_clkdiv_set_enable_state()
88 return __spmi_pmic_clkdiv_set_enable_state(clkdiv, enable, div_factor); in spmi_pmic_clkdiv_set_enable_state()
117 unsigned int div, div_factor; in clk_spmi_pmic_div_round_rate() local
120 div_factor = div_to_div_factor(div); in clk_spmi_pmic_div_round_rate()
121 div = div_factor_to_div(div_factor); in clk_spmi_pmic_div_round_rate()
130 unsigned int div_factor; in clk_spmi_pmic_div_recalc_rate() local
132 regmap_read(clkdiv->regmap, clkdiv->base + REG_DIV_CTL1, &div_factor); in clk_spmi_pmic_div_recalc_rate()
133 div_factor &= DIV_CTL1_DIV_FACTOR_MASK; in clk_spmi_pmic_div_recalc_rate()
135 return parent_rate / div_factor_to_div(div_factor); in clk_spmi_pmic_div_recalc_rate()
142 unsigned int div_factor = div_to_div_factor(parent_rate / rate); in clk_spmi_pmic_div_set_rate() local
156 DIV_CTL1_DIV_FACTOR_MASK, div_factor); in clk_spmi_pmic_div_set_rate()
162 div_factor); in clk_spmi_pmic_div_set_rate()