Lines Matching refs:conf
59 const struct s5_pll_conf *conf)
61 unsigned long rate = parent_rate / conf->div;
63 if (conf->rot_ena) {
64 int sign = conf->rot_dir ? -1 : 1;
65 int divt = sel_rates[conf->rot_sel] * (1 + conf->pre_div);
78 struct s5_pll_conf *conf)
84 memset(conf, 0, sizeof(*conf));
85 conf->div = div;
86 conf->rot_ena = 1; /* Fractional rate */
89 conf->rot_dir = !!d;
91 conf->pre_div = i;
93 conf->rot_sel = j;
94 conf->freq = s5_calc_freq(parent_rate, conf);
95 cur_offset = abs(rate - conf->freq);
98 best = *conf;
105 *conf = best;
110 struct s5_pll_conf *conf)
121 *conf = alt1;
131 *conf = alt1;
133 *conf = alt2;
138 memset(conf, 0, sizeof(*conf));
139 conf->div = parent_rate / rate;
142 return conf->freq;
170 struct s5_pll_conf conf;
174 eff_rate = s5_calc_params(rate, parent_rate, &conf);
179 val |= FIELD_PREP(PLL_DIV, conf.div);
180 if (conf.rot_ena) {
182 val |= FIELD_PREP(PLL_ROT_SEL, conf.rot_sel);
183 val |= FIELD_PREP(PLL_PRE_DIV, conf.pre_div);
184 if (conf.rot_dir)
196 struct s5_pll_conf conf;
202 conf.div = FIELD_GET(PLL_DIV, val);
203 conf.pre_div = FIELD_GET(PLL_PRE_DIV, val);
204 conf.rot_ena = FIELD_GET(PLL_ROT_ENA, val);
205 conf.rot_dir = FIELD_GET(PLL_ROT_DIR, val);
206 conf.rot_sel = FIELD_GET(PLL_ROT_SEL, val);
208 conf.freq = s5_calc_freq(parent_rate, &conf);
210 conf.freq = 0;
213 return conf.freq;
219 struct s5_pll_conf conf;
221 return s5_calc_params(rate, *parent_rate, &conf);