Lines Matching full:frequency

57  * @max_freq:	Maximum frequency for this device
58 * @fxtal: Factory xtal frequency
62 * @frequency: Current output frequency
74 u64 frequency; member
125 * @fout: Factory frequency output
149 data->frequency = fout; in si570_get_defaults()
176 * @frequency: Target frequency
184 * (@out_rfreq) for a given target @frequency.
186 static int si570_calc_divs(unsigned long frequency, struct clk_si570 *data, in si570_calc_divs() argument
197 n1 = div_u64(div_u64(FDCO_MIN, hs_div), frequency); in si570_calc_divs()
201 fdco = (u64)frequency * (u64)hs_div * (u64)n1; in si570_calc_divs()
231 return data->frequency; in si570_recalc_rate()
251 if (div64_u64(abs(rate - data->frequency) * 10000LL, in si570_round_rate()
252 data->frequency) < 35) { in si570_round_rate()
254 div64_u64(data->frequency, 2), data->frequency); in si570_round_rate()
271 * si570_set_frequency() - Adjust output frequency
273 * @frequency: Target frequency
276 * Update output frequency for big frequency changes (> 3,500 ppm).
278 static int si570_set_frequency(struct clk_si570 *data, unsigned long frequency) in si570_set_frequency() argument
282 err = si570_calc_divs(frequency, data, &data->rfreq, &data->n1, in si570_set_frequency()
299 /* Applying a new frequency can take up to 10ms */ in si570_set_frequency()
306 * si570_set_frequency_small() - Adjust output frequency
308 * @frequency: Target frequency
311 * Update output frequency for small frequency changes (< 3,500 ppm).
314 unsigned long frequency) in si570_set_frequency_small() argument
321 data->rfreq = div64_u64((data->rfreq * frequency) + in si570_set_frequency_small()
322 div_u64(data->frequency, 2), data->frequency); in si570_set_frequency_small()
327 /* Applying a new frequency (small change) can take up to 100us */ in si570_set_frequency_small()
342 "requested frequency %lu Hz is out of range\n", rate); in si570_set_rate()
346 if (div64_u64(abs(rate - data->frequency) * 10000LL, in si570_set_rate()
347 data->frequency) < 35) in si570_set_rate()
355 data->frequency = rate; in si570_set_rate()
467 /* Read the requested initial output frequency from device tree */ in si570_probe()
468 if (!of_property_read_u32(client->dev.of_node, "clock-frequency", in si570_probe()
478 dev_info(&client->dev, "registered, current frequency %llu Hz\n", in si570_probe()
479 data->frequency); in si570_probe()