Lines Matching refs:factors

49 	struct clk_factors *factors = to_clk_factors(hw);  in clk_factors_recalc_rate()  local
50 const struct clk_factors_config *config = factors->config; in clk_factors_recalc_rate()
53 reg = readl(factors->reg); in clk_factors_recalc_rate()
65 if (factors->recalc) { in clk_factors_recalc_rate()
75 if (factors->mux) in clk_factors_recalc_rate()
77 (reg >> factors->mux->shift) & in clk_factors_recalc_rate()
78 factors->mux->mask; in clk_factors_recalc_rate()
80 factors->recalc(&factors_req); in clk_factors_recalc_rate()
94 struct clk_factors *factors = to_clk_factors(hw); in clk_factors_determine_rate() local
115 factors->get_factors(&factors_req); in clk_factors_determine_rate()
143 struct clk_factors *factors = to_clk_factors(hw); in clk_factors_set_rate() local
144 const struct clk_factors_config *config = factors->config; in clk_factors_set_rate()
147 factors->get_factors(&req); in clk_factors_set_rate()
149 if (factors->lock) in clk_factors_set_rate()
150 spin_lock_irqsave(factors->lock, flags); in clk_factors_set_rate()
153 reg = readl(factors->reg); in clk_factors_set_rate()
162 writel(reg, factors->reg); in clk_factors_set_rate()
167 if (factors->lock) in clk_factors_set_rate()
168 spin_unlock_irqrestore(factors->lock, flags); in clk_factors_set_rate()
185 struct clk_factors *factors; in __sunxi_factors_register() local
206 factors = kzalloc(sizeof(struct clk_factors), GFP_KERNEL); in __sunxi_factors_register()
207 if (!factors) in __sunxi_factors_register()
211 factors->reg = reg; in __sunxi_factors_register()
212 factors->config = data->table; in __sunxi_factors_register()
213 factors->get_factors = data->getter; in __sunxi_factors_register()
214 factors->recalc = data->recalc; in __sunxi_factors_register()
215 factors->lock = lock; in __sunxi_factors_register()
223 factors->gate = gate; in __sunxi_factors_register()
228 gate->lock = factors->lock; in __sunxi_factors_register()
238 factors->mux = mux; in __sunxi_factors_register()
244 mux->lock = factors->lock; in __sunxi_factors_register()
251 &factors->hw, &clk_factors_ops, in __sunxi_factors_register()
270 kfree(factors); in __sunxi_factors_register()
294 struct clk_factors *factors; in sunxi_factors_unregister() local
299 factors = to_clk_factors(hw); in sunxi_factors_unregister()
304 kfree(factors->mux); in sunxi_factors_unregister()
305 kfree(factors->gate); in sunxi_factors_unregister()
306 kfree(factors); in sunxi_factors_unregister()