Lines Matching refs:factors

46 	struct clk_factors *factors = to_clk_factors(hw);  in clk_factors_recalc_rate()  local
47 const struct clk_factors_config *config = factors->config; in clk_factors_recalc_rate()
50 reg = readl(factors->reg); in clk_factors_recalc_rate()
62 if (factors->recalc) { in clk_factors_recalc_rate()
72 if (factors->mux) in clk_factors_recalc_rate()
74 (reg >> factors->mux->shift) & in clk_factors_recalc_rate()
75 factors->mux->mask; in clk_factors_recalc_rate()
77 factors->recalc(&factors_req); in clk_factors_recalc_rate()
91 struct clk_factors *factors = to_clk_factors(hw); in clk_factors_determine_rate() local
112 factors->get_factors(&factors_req); in clk_factors_determine_rate()
140 struct clk_factors *factors = to_clk_factors(hw); in clk_factors_set_rate() local
141 const struct clk_factors_config *config = factors->config; in clk_factors_set_rate()
144 factors->get_factors(&req); in clk_factors_set_rate()
146 if (factors->lock) in clk_factors_set_rate()
147 spin_lock_irqsave(factors->lock, flags); in clk_factors_set_rate()
150 reg = readl(factors->reg); in clk_factors_set_rate()
159 writel(reg, factors->reg); in clk_factors_set_rate()
164 if (factors->lock) in clk_factors_set_rate()
165 spin_unlock_irqrestore(factors->lock, flags); in clk_factors_set_rate()
182 struct clk_factors *factors; in __sunxi_factors_register() local
203 factors = kzalloc(sizeof(struct clk_factors), GFP_KERNEL); in __sunxi_factors_register()
204 if (!factors) in __sunxi_factors_register()
208 factors->reg = reg; in __sunxi_factors_register()
209 factors->config = data->table; in __sunxi_factors_register()
210 factors->get_factors = data->getter; in __sunxi_factors_register()
211 factors->recalc = data->recalc; in __sunxi_factors_register()
212 factors->lock = lock; in __sunxi_factors_register()
220 factors->gate = gate; in __sunxi_factors_register()
225 gate->lock = factors->lock; in __sunxi_factors_register()
235 factors->mux = mux; in __sunxi_factors_register()
241 mux->lock = factors->lock; in __sunxi_factors_register()
248 &factors->hw, &clk_factors_ops, in __sunxi_factors_register()
267 kfree(factors); in __sunxi_factors_register()
291 struct clk_factors *factors; in sunxi_factors_unregister() local
296 factors = to_clk_factors(hw); in sunxi_factors_unregister()
301 kfree(factors->mux); in sunxi_factors_unregister()
302 kfree(factors->gate); in sunxi_factors_unregister()
303 kfree(factors); in sunxi_factors_unregister()