Lines Matching full:divider
11 #include "clk-regmap-divider.h"
21 struct clk_regmap_div *divider = to_clk_regmap_div(hw); in div_round_ro_rate() local
22 struct clk_regmap *clkr = ÷r->clkr; in div_round_ro_rate()
25 regmap_read(clkr->regmap, divider->reg, &val); in div_round_ro_rate()
26 val >>= divider->shift; in div_round_ro_rate()
27 val &= BIT(divider->width) - 1; in div_round_ro_rate()
29 return divider_ro_round_rate(hw, rate, prate, NULL, divider->width, in div_round_ro_rate()
36 struct clk_regmap_div *divider = to_clk_regmap_div(hw); in div_round_rate() local
38 return divider_round_rate(hw, rate, prate, NULL, divider->width, in div_round_rate()
45 struct clk_regmap_div *divider = to_clk_regmap_div(hw); in div_set_rate() local
46 struct clk_regmap *clkr = ÷r->clkr; in div_set_rate()
49 div = divider_get_val(rate, parent_rate, NULL, divider->width, in div_set_rate()
52 return regmap_update_bits(clkr->regmap, divider->reg, in div_set_rate()
53 (BIT(divider->width) - 1) << divider->shift, in div_set_rate()
54 div << divider->shift); in div_set_rate()
60 struct clk_regmap_div *divider = to_clk_regmap_div(hw); in div_recalc_rate() local
61 struct clk_regmap *clkr = ÷r->clkr; in div_recalc_rate()
64 regmap_read(clkr->regmap, divider->reg, &div); in div_recalc_rate()
65 div >>= divider->shift; in div_recalc_rate()
66 div &= BIT(divider->width) - 1; in div_recalc_rate()
69 CLK_DIVIDER_ROUND_CLOSEST, divider->width); in div_recalc_rate()