Home
last modified time | relevance | path

Searched refs:clk_freq (Results 1 – 25 of 72) sorted by relevance

123

/kernel/linux/linux-5.10/drivers/pwm/
Dpwm-atmel-hlcdc.c52 unsigned long clk_freq; in atmel_hlcdc_pwm_apply() local
58 clk_freq = clk_get_rate(new_clk); in atmel_hlcdc_pwm_apply()
59 if (!clk_freq) in atmel_hlcdc_pwm_apply()
63 do_div(clk_period_ns, clk_freq); in atmel_hlcdc_pwm_apply()
70 clk_freq = clk_get_rate(new_clk); in atmel_hlcdc_pwm_apply()
71 if (!clk_freq) in atmel_hlcdc_pwm_apply()
75 do_div(clk_period_ns, clk_freq); in atmel_hlcdc_pwm_apply()
/kernel/linux/linux-5.10/drivers/soundwire/
Dmipi_disco.c66 prop->clk_freq = devm_kcalloc(bus->dev, prop->num_clk_freq, in sdw_master_read_prop()
67 sizeof(*prop->clk_freq), in sdw_master_read_prop()
69 if (!prop->clk_freq) in sdw_master_read_prop()
74 prop->clk_freq, prop->num_clk_freq); in sdw_master_read_prop()
81 if (!prop->max_clk_freq && prop->clk_freq) { in sdw_master_read_prop()
82 prop->max_clk_freq = prop->clk_freq[0]; in sdw_master_read_prop()
84 if (prop->clk_freq[i] > prop->max_clk_freq) in sdw_master_read_prop()
85 prop->max_clk_freq = prop->clk_freq[i]; in sdw_master_read_prop()
Dgeneric_bandwidth_allocation.c311 static int sdw_select_row_col(struct sdw_bus *bus, int clk_freq) in sdw_select_row_col() argument
324 frame_freq = clk_freq / frame_int; in sdw_select_row_col()
326 if ((clk_freq - (frame_freq * SDW_FRAME_CTRL_BITS)) < in sdw_select_row_col()
358 clk_buf = mstr_prop->clk_freq; in sdw_compute_bus_params()
/kernel/linux/linux-5.10/drivers/spi/
Dspi-ar934x.c47 unsigned int clk_freq; member
52 int div = DIV_ROUND_UP(sp->clk_freq, freq * 2) - 1; in ar934x_spi_clk_div()
67 (spi->max_speed_hz > (sp->clk_freq / 2))) { in ar934x_spi_setup()
68 spi->max_speed_hz = sp->clk_freq / 2; in ar934x_spi_setup()
69 } else if (spi->max_speed_hz < (sp->clk_freq / 128)) { in ar934x_spi_setup()
203 sp->clk_freq = clk_get_rate(clk); in ar934x_spi_probe()
Dspi-pl022.c1744 ssp_clock_params * clk_freq) in calculate_effective_freq() argument
1808 clk_freq->cpsdvsr = (u8) (best_cpsdvsr & 0xFF); in calculate_effective_freq()
1809 clk_freq->scr = (u8) (best_scr & 0xFF); in calculate_effective_freq()
1814 clk_freq->cpsdvsr, clk_freq->scr); in calculate_effective_freq()
1853 struct ssp_clock_params clk_freq = { .cpsdvsr = 0, .scr = 0}; in pl022_setup() local
1912 if ((0 == chip_info->clk_freq.cpsdvsr) in pl022_setup()
1913 && (0 == chip_info->clk_freq.scr)) { in pl022_setup()
1916 &clk_freq); in pl022_setup()
1920 memcpy(&clk_freq, &chip_info->clk_freq, sizeof(clk_freq)); in pl022_setup()
1921 if ((clk_freq.cpsdvsr % 2) != 0) in pl022_setup()
[all …]
/kernel/linux/linux-5.10/drivers/hwmon/
Dg762.c125 u32 clk_freq; member
169 static inline unsigned int rpm_from_cnt(u8 cnt, u32 clk_freq, u16 p, in rpm_from_cnt() argument
175 return (clk_freq * 30 * gear_mult) / ((cnt ? cnt : 1) * p * clk_div); in rpm_from_cnt()
182 static inline unsigned char cnt_from_rpm(unsigned long rpm, u32 clk_freq, u16 p, in cnt_from_rpm() argument
185 unsigned long f1 = clk_freq * 30 * gear_mult; in cnt_from_rpm()
265 data->clk_freq = val; in do_set_clk_freq()
511 data->set_cnt = cnt_from_rpm(val, data->clk_freq, in do_set_fan_target()
594 unsigned long clk_freq; in g762_of_clock_enable() local
613 clk_freq = clk_get_rate(clk); in g762_of_clock_enable()
614 ret = do_set_clk_freq(&client->dev, clk_freq); in g762_of_clock_enable()
[all …]
/kernel/linux/linux-5.10/arch/mips/pic32/pic32mzda/
Dearly_clk.c88 u32 clk_freq; in pic32_get_pbclk() local
95 clk_freq = pic32_get_sysclk(); in pic32_get_pbclk()
97 return clk_freq / pbdiv; in pic32_get_pbclk()
/kernel/linux/linux-5.10/drivers/watchdog/
Dvisconti_wdt.c127 unsigned long clk_freq; in visconti_wdt_probe() local
151 clk_freq = clk_get_rate(clk); in visconti_wdt_probe()
152 if (!clk_freq) in visconti_wdt_probe()
155 priv->div = clk_freq / VISCONTI_WDT_FREQ; in visconti_wdt_probe()
/kernel/linux/linux-5.10/sound/soc/intel/boards/
Dsof_sdw_rt1308.c99 int clk_id, clk_freq, pll_out; in rt1308_i2s_hw_params() local
103 clk_freq = 38400000; in rt1308_i2s_hw_params()
108 err = snd_soc_dai_set_pll(codec_dai, 0, clk_id, clk_freq, pll_out); in rt1308_i2s_hw_params()
/kernel/linux/linux-5.10/drivers/iio/adc/
Dstm32-dfsdm-core.c222 unsigned long clk_freq, divider; in stm32_dfsdm_parse_of() local
252 clk_freq = clk_get_rate(priv->aclk); in stm32_dfsdm_parse_of()
254 clk_freq = clk_get_rate(priv->clk); in stm32_dfsdm_parse_of()
264 divider = div_u64_rem(clk_freq, spi_freq, &rem); in stm32_dfsdm_parse_of()
277 priv->dfsdm.spi_master_freq = clk_freq / (priv->spi_clk_out_div + 1); in stm32_dfsdm_parse_of()
282 clk_freq, spi_freq, priv->spi_clk_out_div + 1, rem); in stm32_dfsdm_parse_of()
/kernel/linux/linux-5.10/drivers/net/mdio/
Dmdio-bcm-unimac.c46 u32 clk_freq; member
194 if (!priv->clk_freq) in unimac_mdio_clk_set()
202 div = (rate / (2 * priv->clk_freq)) - 1; in unimac_mdio_clk_set()
253 if (of_property_read_u32(np, "clock-frequency", &priv->clk_freq)) in unimac_mdio_probe()
254 priv->clk_freq = 0; in unimac_mdio_probe()
/kernel/linux/linux-5.10/drivers/i2c/busses/
Di2c-sun6i-p2wi.c189 u32 clk_freq = I2C_MAX_STANDARD_MODE_FREQ; in p2wi_probe() local
196 of_property_read_u32(np, "clock-frequency", &clk_freq); in p2wi_probe()
197 if (clk_freq > P2WI_MAX_FREQ) { in p2wi_probe()
200 clk_freq); in p2wi_probe()
287 clk_div = parent_clk_freq / clk_freq; in p2wi_probe()
Di2c-nomadik.c176 u32 clk_freq; member
399 div = (dev->clk_freq > I2C_MAX_STANDARD_MODE_FREQ) ? 3 : 2; in setup_i2c_controller()
409 brcr2 = (i2c_clk/(dev->clk_freq * div)) & 0xffff; in setup_i2c_controller()
951 if (of_property_read_u32(np, "clock-frequency", &nmk->clk_freq)) in nmk_i2c_of_probe()
952 nmk->clk_freq = I2C_MAX_STANDARD_MODE_FREQ; in nmk_i2c_of_probe()
955 if (nmk->clk_freq <= I2C_MAX_STANDARD_MODE_FREQ) in nmk_i2c_of_probe()
/kernel/linux/linux-5.10/drivers/thermal/st/
Dstm_thermal.c202 u32 value, clk_freq; in stm_thermal_calibration() local
206 clk_freq = clk_get_rate(sensor->clk); in stm_thermal_calibration()
207 if (!clk_freq) in stm_thermal_calibration()
211 clk_freq /= ONE_MHZ; in stm_thermal_calibration()
212 if (clk_freq) { in stm_thermal_calibration()
213 while (prescaler <= clk_freq) in stm_thermal_calibration()
/kernel/linux/linux-5.10/drivers/net/wireless/ti/wl18xx/
Dmain.c712 u16 clk_freq; in wl18xx_set_clk() local
721 ret = wl18xx_top_reg_read(wl, PRIMARY_CLK_DETECT, &clk_freq); in wl18xx_set_clk()
725 wl1271_debug(DEBUG_BOOT, "clock freq %d (%d, %d, %d, %d, %s)", clk_freq, in wl18xx_set_clk()
726 wl18xx_clk_table[clk_freq].n, wl18xx_clk_table[clk_freq].m, in wl18xx_set_clk()
727 wl18xx_clk_table[clk_freq].p, wl18xx_clk_table[clk_freq].q, in wl18xx_set_clk()
728 wl18xx_clk_table[clk_freq].swallow ? "swallow" : "spit"); in wl18xx_set_clk()
732 wl18xx_clk_table_coex[clk_freq].n); in wl18xx_set_clk()
737 wl18xx_clk_table_coex[clk_freq].m); in wl18xx_set_clk()
748 wl18xx_clk_table[clk_freq].n); in wl18xx_set_clk()
753 wl18xx_clk_table[clk_freq].m); in wl18xx_set_clk()
[all …]
/kernel/linux/linux-5.10/drivers/iio/imu/
Dadis16475.c101 u32 clk_freq; member
261 *freq = DIV_ROUND_CLOSEST(st->clk_freq, dec + 1); in adis16475_get_freq()
274 dec = DIV_ROUND_CLOSEST(st->clk_freq, freq); in adis16475_set_freq()
1075 st->clk_freq = st->info->int_clk * 1000; in adis16475_config_sync_mode()
1104 st->clk_freq = clk_get_rate(clk); in adis16475_config_sync_mode()
1105 if (st->clk_freq < sync->min_rate || in adis16475_config_sync_mode()
1106 st->clk_freq > sync->max_rate) { in adis16475_config_sync_mode()
1109 st->clk_freq, sync->min_rate, sync->max_rate); in adis16475_config_sync_mode()
1137 st->clk_freq); in adis16475_config_sync_mode()
1145 st->clk_freq = scaled_out_freq; in adis16475_config_sync_mode()
[all …]
Dadis16480.c163 unsigned int clk_freq; member
332 t = t / st->clk_freq; in adis16480_set_freq()
335 t = st->clk_freq / t; in adis16480_set_freq()
373 freq = st->clk_freq * t; in adis16480_get_freq()
375 freq = st->clk_freq / (t + 1); in adis16480_get_freq()
1279 st->clk_freq = clk_get_rate(st->ext_clk); in adis16480_probe()
1280 st->clk_freq *= 1000; /* micro */ in adis16480_probe()
1282 st->clk_freq = st->chip_info->int_clk; in adis16480_probe()
/kernel/linux/linux-5.10/sound/soc/codecs/
Dmax98373-sdw.c467 unsigned int clk_freq) in max98373_clock_calculate() argument
477 if (clk_freq == (max98373_clk_family[y] >> x)) in max98373_clock_calculate()
482 clk_freq); in max98373_clock_calculate()
491 unsigned int clk_freq, value; in max98373_clock_config() local
493 clk_freq = (params->curr_dr_freq >> 1); in max98373_clock_config()
500 value = max98373_clock_calculate(slave, clk_freq); in max98373_clock_config()
/kernel/linux/linux-5.10/include/linux/platform_data/
Dg762.h21 u32 clk_freq; member
/kernel/linux/linux-5.10/drivers/media/pci/cx25821/
Dcx25821-cards.c24 .clk_freq = 0,
/kernel/linux/linux-5.10/drivers/bus/
Dsunxi-rsb.c630 u32 clk_delay, clk_freq = 3000000; in sunxi_rsb_probe() local
634 of_property_read_u32(np, "clock-frequency", &clk_freq); in sunxi_rsb_probe()
635 if (clk_freq > RSB_MAX_FREQ) { in sunxi_rsb_probe()
638 clk_freq); in sunxi_rsb_probe()
700 clk_div = p_clk_freq / clk_freq / 2; in sunxi_rsb_probe()
/kernel/linux/linux-5.10/drivers/media/pci/cobalt/
Dm00473_freewheel_memmap_package.h21 uint32_t clk_freq; /* Reg 0x0018 */ member
/kernel/linux/linux-5.10/drivers/media/dvb-frontends/
Dmn88443x.c192 u32 clk_freq; member
407 if (chip->clk_freq >= CLK_LOW && chip->clk_freq < CLK_DIRECT) { in mn88443x_t_set_freq()
416 adckt = chip->clk_freq; in mn88443x_t_set_freq()
420 chip->clk_freq, adckt, chip->if_freq); in mn88443x_t_set_freq()
744 chip->clk_freq = clk_get_rate(chip->mclk); in mn88443x_probe()
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/dmub/inc/
Ddmub_trace_buffer.h64 uint32_t clk_freq; member
/kernel/linux/linux-5.10/drivers/staging/iio/frequency/
Dad9834.c113 unsigned long clk_freq; in ad9834_write_frequency() local
116 clk_freq = clk_get_rate(st->mclk); in ad9834_write_frequency()
118 if (fout > (clk_freq / 2)) in ad9834_write_frequency()
121 regval = ad9834_calc_freqreg(clk_freq, fout); in ad9834_write_frequency()

123