Lines Matching refs:div
63 struct clk_regmap_div_data *div = clk_get_regmap_div_data(clk); in clk_regmap_div_recalc_rate() local
67 ret = regmap_read(clk->map, div->offset, &val); in clk_regmap_div_recalc_rate()
72 val >>= div->shift; in clk_regmap_div_recalc_rate()
73 val &= clk_div_mask(div->width); in clk_regmap_div_recalc_rate()
74 return divider_recalc_rate(hw, prate, val, div->table, div->flags, in clk_regmap_div_recalc_rate()
75 div->width); in clk_regmap_div_recalc_rate()
82 struct clk_regmap_div_data *div = clk_get_regmap_div_data(clk); in clk_regmap_div_determine_rate() local
87 if (div->flags & CLK_DIVIDER_READ_ONLY) { in clk_regmap_div_determine_rate()
88 ret = regmap_read(clk->map, div->offset, &val); in clk_regmap_div_determine_rate()
92 val >>= div->shift; in clk_regmap_div_determine_rate()
93 val &= clk_div_mask(div->width); in clk_regmap_div_determine_rate()
95 return divider_ro_determine_rate(hw, req, div->table, in clk_regmap_div_determine_rate()
96 div->width, div->flags, val); in clk_regmap_div_determine_rate()
99 return divider_determine_rate(hw, req, div->table, div->width, in clk_regmap_div_determine_rate()
100 div->flags); in clk_regmap_div_determine_rate()
107 struct clk_regmap_div_data *div = clk_get_regmap_div_data(clk); in clk_regmap_div_set_rate() local
111 ret = divider_get_val(rate, parent_rate, div->table, div->width, in clk_regmap_div_set_rate()
112 div->flags); in clk_regmap_div_set_rate()
116 val = (unsigned int)ret << div->shift; in clk_regmap_div_set_rate()
117 return regmap_update_bits(clk->map, div->offset, in clk_regmap_div_set_rate()
118 clk_div_mask(div->width) << div->shift, val); in clk_regmap_div_set_rate()