Lines Matching full:frequency
54 * @max_freq: Maximum frequency for this device
68 * @fxtal: Factory xtal frequency
72 * @frequency: Current output frequency
84 u64 frequency; member
130 * @fout: Factory frequency output
158 data->frequency = fout; in si570_get_defaults()
185 * @frequency: Target frequency
193 * (@out_rfreq) for a given target @frequency.
195 static int si570_calc_divs(unsigned long frequency, struct clk_si570 *data, in si570_calc_divs() argument
206 n1 = div_u64(div_u64(FDCO_MIN, hs_div), frequency); in si570_calc_divs()
210 fdco = (u64)frequency * (u64)hs_div * (u64)n1; in si570_calc_divs()
240 return data->frequency; in si570_recalc_rate()
260 if (div64_u64(abs(rate - data->frequency) * 10000LL, in si570_round_rate()
261 data->frequency) < 35) { in si570_round_rate()
263 div64_u64(data->frequency, 2), data->frequency); in si570_round_rate()
280 * si570_set_frequency() - Adjust output frequency
282 * @frequency: Target frequency
285 * Update output frequency for big frequency changes (> 3,500 ppm).
287 static int si570_set_frequency(struct clk_si570 *data, unsigned long frequency) in si570_set_frequency() argument
291 err = si570_calc_divs(frequency, data, &data->rfreq, &data->n1, in si570_set_frequency()
308 /* Applying a new frequency can take up to 10ms */ in si570_set_frequency()
315 * si570_set_frequency_small() - Adjust output frequency
317 * @frequency: Target frequency
320 * Update output frequency for small frequency changes (< 3,500 ppm).
323 unsigned long frequency) in si570_set_frequency_small() argument
330 data->rfreq = div64_u64((data->rfreq * frequency) + in si570_set_frequency_small()
331 div_u64(data->frequency, 2), data->frequency); in si570_set_frequency_small()
336 /* Applying a new frequency (small change) can take up to 100us */ in si570_set_frequency_small()
351 "requested frequency %lu Hz is out of range\n", rate); in si570_set_rate()
355 if (div64_u64(abs(rate - data->frequency) * 10000LL, in si570_set_rate()
356 data->frequency) < 35) in si570_set_rate()
364 data->frequency = rate; in si570_set_rate()
475 /* Read the requested initial output frequency from device tree */ in si570_probe()
476 if (!of_property_read_u32(client->dev.of_node, "clock-frequency", in si570_probe()
484 dev_info(&client->dev, "registered, current frequency %llu Hz\n", in si570_probe()
485 data->frequency); in si570_probe()