Lines Matching defs:factor_hw
66 static int owl_clk_val_best(const struct owl_factor_hw *factor_hw,
70 const struct clk_factor_table *clkt = factor_hw->table;
84 for (clkt = factor_hw->table; clkt->div; clkt++) {
120 const struct owl_factor_hw *factor_hw,
124 const struct clk_factor_table *clkt = factor_hw->table;
127 val = owl_clk_val_best(factor_hw, &common->hw, rate, parent_rate);
137 struct owl_factor_hw *factor_hw = &factor->factor_hw;
139 return owl_factor_helper_round_rate(&factor->common, factor_hw,
144 const struct owl_factor_hw *factor_hw,
147 const struct clk_factor_table *clkt = factor_hw->table;
154 regmap_read(common->regmap, factor_hw->reg, ®);
156 val = reg >> factor_hw->shift;
157 val &= div_mask(factor_hw);
161 WARN(!(factor_hw->fct_flags & CLK_DIVIDER_ALLOW_ZERO),
177 struct owl_factor_hw *factor_hw = &factor->factor_hw;
180 return owl_factor_helper_recalc_rate(common, factor_hw, parent_rate);
184 const struct owl_factor_hw *factor_hw,
190 val = _get_table_val(factor_hw->table, rate, parent_rate);
192 if (val > div_mask(factor_hw))
193 val = div_mask(factor_hw);
195 regmap_read(common->regmap, factor_hw->reg, ®);
197 reg &= ~(div_mask(factor_hw) << factor_hw->shift);
198 reg |= val << factor_hw->shift;
200 regmap_write(common->regmap, factor_hw->reg, reg);
209 struct owl_factor_hw *factor_hw = &factor->factor_hw;
212 return owl_factor_helper_set_rate(common, factor_hw,