Home
last modified time | relevance | path

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

1234

/linux-6.1.9/sound/soc/intel/boards/
Dsof_cirrus_common.c96 int clk_freq, i, ret; in cs35l41_hw_params() local
98 clk_freq = sof_dai_get_bclk(rtd); /* BCLK freq */ in cs35l41_hw_params()
100 if (clk_freq <= 0) { in cs35l41_hw_params()
101 dev_err(rtd->dev, "fail to get bclk freq, ret %d\n", clk_freq); in cs35l41_hw_params()
108 clk_freq, SND_SOC_CLOCK_IN); in cs35l41_hw_params()
118 clk_freq, SND_SOC_CLOCK_IN); in cs35l41_hw_params()
Dsof_realtek_common.c270 int i, clk_freq, ret; in rt1015_hw_params() local
272 clk_freq = sof_dai_get_bclk(rtd); in rt1015_hw_params()
274 if (clk_freq <= 0) { in rt1015_hw_params()
275 dev_err(rtd->dev, "fail to get bclk freq, ret %d\n", clk_freq); in rt1015_hw_params()
281 clk_freq, in rt1015_hw_params()
428 int clk_id, clk_freq, pll_out; in rt1308_hw_params() local
433 clk_freq = sof_dai_get_mclk(rtd); in rt1308_hw_params()
438 ret = snd_soc_dai_set_pll(codec_dai, 0, clk_id, clk_freq, pll_out); in rt1308_hw_params()
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()
/linux-6.1.9/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()
/linux-6.1.9/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.c310 static int sdw_select_row_col(struct sdw_bus *bus, int clk_freq) in sdw_select_row_col() argument
323 frame_freq = clk_freq / frame_int; in sdw_select_row_col()
325 if ((clk_freq - (frame_freq * SDW_FRAME_CTRL_BITS)) < in sdw_select_row_col()
357 clk_buf = mstr_prop->clk_freq; in sdw_compute_bus_params()
/linux-6.1.9/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()
211 sp->clk_freq = clk_get_rate(clk); in ar934x_spi_probe()
Dspi-pl022.c1737 ssp_clock_params * clk_freq) in calculate_effective_freq() argument
1801 clk_freq->cpsdvsr = (u8) (best_cpsdvsr & 0xFF); in calculate_effective_freq()
1802 clk_freq->scr = (u8) (best_scr & 0xFF); in calculate_effective_freq()
1807 clk_freq->cpsdvsr, clk_freq->scr); in calculate_effective_freq()
1845 struct ssp_clock_params clk_freq = { .cpsdvsr = 0, .scr = 0}; in pl022_setup() local
1904 if ((0 == chip_info->clk_freq.cpsdvsr) in pl022_setup()
1905 && (0 == chip_info->clk_freq.scr)) { in pl022_setup()
1908 &clk_freq); in pl022_setup()
1912 memcpy(&clk_freq, &chip_info->clk_freq, sizeof(clk_freq)); in pl022_setup()
1913 if ((clk_freq.cpsdvsr % 2) != 0) in pl022_setup()
[all …]
/linux-6.1.9/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 …]
/linux-6.1.9/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()
/linux-6.1.9/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()
/linux-6.1.9/drivers/iio/imu/
Dadis16475.c102 u32 clk_freq; member
263 u32 sample_rate = st->clk_freq; in adis16475_get_freq()
274 sample_rate = st->clk_freq * sync_scale; in adis16475_get_freq()
295 u32 sample_rate = st->clk_freq; in adis16475_set_freq()
314 unsigned long scaled_rate = lcm(st->clk_freq, freq); in adis16475_set_freq()
323 scaled_rate = 2100000 / st->clk_freq * st->clk_freq; in adis16475_set_freq()
338 scaled_rate = roundup(1900000, st->clk_freq); in adis16475_set_freq()
340 sync_scale = scaled_rate / st->clk_freq; in adis16475_set_freq()
1131 st->clk_freq = st->info->int_clk * 1000; in adis16475_config_sync_mode()
1153 st->clk_freq = clk_get_rate(clk); in adis16475_config_sync_mode()
[all …]
Dadis16480.c172 unsigned int clk_freq; member
331 unsigned int t, sample_rate = st->clk_freq; in adis16480_set_freq()
355 unsigned long scaled_rate = lcm(st->clk_freq, t); in adis16480_set_freq()
364 scaled_rate = st->chip_info->int_clk / st->clk_freq * st->clk_freq; in adis16480_set_freq()
379 scaled_rate = roundup(4000000, st->clk_freq); in adis16480_set_freq()
381 sync_scale = scaled_rate / st->clk_freq; in adis16480_set_freq()
407 unsigned int freq, sample_rate = st->clk_freq; in adis16480_get_freq()
418 sample_rate = st->clk_freq * sync_scale; in adis16480_get_freq()
1453 st->clk_freq = clk_get_rate(st->ext_clk); in adis16480_probe()
1454 st->clk_freq *= 1000; /* micro */ in adis16480_probe()
[all …]
/linux-6.1.9/drivers/iio/adc/
Dstm32-dfsdm-core.c219 unsigned long clk_freq, divider; in stm32_dfsdm_parse_of() local
249 clk_freq = clk_get_rate(priv->aclk); in stm32_dfsdm_parse_of()
251 clk_freq = clk_get_rate(priv->clk); in stm32_dfsdm_parse_of()
261 divider = div_u64_rem(clk_freq, spi_freq, &rem); in stm32_dfsdm_parse_of()
274 priv->dfsdm.spi_master_freq = clk_freq / (priv->spi_clk_out_div + 1); in stm32_dfsdm_parse_of()
279 clk_freq, spi_freq, priv->spi_clk_out_div + 1, rem); in stm32_dfsdm_parse_of()
/linux-6.1.9/drivers/net/mdio/
Dmdio-bcm-unimac.c44 u32 clk_freq; member
192 if (!priv->clk_freq) in unimac_mdio_clk_set()
200 div = (rate / (2 * priv->clk_freq)) - 1; in unimac_mdio_clk_set()
251 if (of_property_read_u32(np, "clock-frequency", &priv->clk_freq)) in unimac_mdio_probe()
252 priv->clk_freq = 0; in unimac_mdio_probe()
/linux-6.1.9/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()
/linux-6.1.9/sound/soc/intel/avs/boards/
Drt5682.c127 int clk_id, clk_freq; in avs_rt5682_hw_params() local
133 clk_freq = 24000000; in avs_rt5682_hw_params()
135 clk_freq = 19200000; in avs_rt5682_hw_params()
138 clk_freq = params_rate(params) * 50; in avs_rt5682_hw_params()
143 ret = snd_soc_dai_set_pll(codec_dai, 0, clk_id, clk_freq, pll_out); in avs_rt5682_hw_params()
Drt298.c110 unsigned int clk_freq; in avs_rt298_hw_params() local
114 clk_freq = 24000000; in avs_rt298_hw_params()
116 clk_freq = 19200000; in avs_rt298_hw_params()
118 ret = snd_soc_dai_set_sysclk(codec_dai, RT298_SCLK_S_PLL, clk_freq, SND_SOC_CLOCK_IN); in avs_rt298_hw_params()
Dda7219.c79 int clk_freq; in avs_da7219_codec_init() local
83 clk_freq = 19200000; in avs_da7219_codec_init()
85 ret = snd_soc_dai_set_sysclk(codec_dai, DA7219_CLKSRC_MCLK, clk_freq, SND_SOC_CLOCK_IN); in avs_da7219_codec_init()
/linux-6.1.9/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()
/linux-6.1.9/drivers/bus/
Dsunxi-rsb.c127 u32 clk_freq; member
677 clk_div = p_clk_freq / rsb->clk_freq / 2; in sunxi_rsb_hw_init()
746 u32 clk_freq = 3000000; in sunxi_rsb_probe() local
749 of_property_read_u32(np, "clock-frequency", &clk_freq); in sunxi_rsb_probe()
750 if (clk_freq > RSB_MAX_FREQ) { in sunxi_rsb_probe()
753 clk_freq); in sunxi_rsb_probe()
762 rsb->clk_freq = clk_freq; in sunxi_rsb_probe()
/linux-6.1.9/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 …]
/linux-6.1.9/sound/soc/codecs/
Dmax98373-sdw.c482 unsigned int clk_freq) in max98373_clock_calculate() argument
492 if (clk_freq == (max98373_clk_family[y] >> x)) in max98373_clock_calculate()
497 clk_freq); in max98373_clock_calculate()
506 unsigned int clk_freq, value; in max98373_clock_config() local
508 clk_freq = (params->curr_dr_freq >> 1); in max98373_clock_config()
515 value = max98373_clock_calculate(slave, clk_freq); in max98373_clock_config()
/linux-6.1.9/include/linux/platform_data/
Dg762.h21 u32 clk_freq; member
/linux-6.1.9/drivers/media/pci/cx25821/
Dcx25821-cards.c24 .clk_freq = 0,

1234