Lines Matching defs:factors
16 #include "clk-factors.h"
46 struct clk_factors *factors = to_clk_factors(hw);
47 const struct clk_factors_config *config = factors->config;
50 reg = readl(factors->reg);
62 if (factors->recalc) {
72 if (factors->mux)
74 (reg >> factors->mux->shift) &
75 factors->mux->mask;
77 factors->recalc(&factors_req);
91 struct clk_factors *factors = to_clk_factors(hw);
112 factors->get_factors(&factors_req);
140 struct clk_factors *factors = to_clk_factors(hw);
141 const struct clk_factors_config *config = factors->config;
144 factors->get_factors(&req);
146 if (factors->lock)
147 spin_lock_irqsave(factors->lock, flags);
150 reg = readl(factors->reg);
152 /* Set up the new factors - macros do not do anything if width is 0 */
159 writel(reg, factors->reg);
164 if (factors->lock)
165 spin_unlock_irqrestore(factors->lock, flags);
182 struct clk_factors *factors;
203 factors = kzalloc(sizeof(struct clk_factors), GFP_KERNEL);
204 if (!factors)
207 /* set up factors properties */
208 factors->reg = reg;
209 factors->config = data->table;
210 factors->get_factors = data->getter;
211 factors->recalc = data->recalc;
212 factors->lock = lock;
220 factors->gate = gate;
225 gate->lock = factors->lock;
235 factors->mux = mux;
241 mux->lock = factors->lock;
248 &factors->hw, &clk_factors_ops,
267 kfree(factors);
291 struct clk_factors *factors;
296 factors = to_clk_factors(hw);
301 kfree(factors->mux);
302 kfree(factors->gate);
303 kfree(factors);