/drivers/pwm/ |
D | pwm-atmel-hlcdc.c | 52 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()
|
/drivers/soundwire/ |
D | mipi_disco.c | 66 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()
|
D | generic_bandwidth_allocation.c | 310 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()
|
/drivers/spi/ |
D | spi-ar934x.c | 47 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()
|
D | spi-pl022.c | 1737 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 …]
|
D | spi-mxs.c | 536 int devid, clk_freq; in mxs_spi_probe() local 560 &clk_freq); in mxs_spi_probe() 562 clk_freq = clk_freq_default; in mxs_spi_probe() 615 clk_set_rate(ssp->clk, clk_freq); in mxs_spi_probe()
|
/drivers/hwmon/ |
D | g762.c | 125 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 …]
|
/drivers/i2c/busses/ |
D | i2c-sun6i-p2wi.c | 189 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() 204 if (clk_freq == 0) { in p2wi_probe() 292 clk_div = parent_clk_freq / clk_freq; in p2wi_probe()
|
D | i2c-nomadik.c | 176 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()
|
D | i2c-qup.c | 1665 u32 clk_freq = DEFAULT_CLK_FREQ; in qup_i2c_probe() local 1679 clk_freq = scl_freq; in qup_i2c_probe() 1681 ret = device_property_read_u32(qup->dev, "clock-frequency", &clk_freq); in qup_i2c_probe() 1752 if (!clk_freq || clk_freq > I2C_MAX_FAST_MODE_PLUS_FREQ) { in qup_i2c_probe() 1754 clk_freq); in qup_i2c_probe() 1861 if (clk_freq <= I2C_MAX_STANDARD_MODE_FREQ) { in qup_i2c_probe() 1862 fs_div = ((src_clk_freq / clk_freq) / 2) - 3; in qup_i2c_probe() 1866 fs_div = ((src_clk_freq / clk_freq) - 6) * 2 / 3; in qup_i2c_probe() 1874 one_bit_t = (USEC_PER_SEC / clk_freq) + 1; in qup_i2c_probe()
|
/drivers/iio/imu/ |
D | adis16475.c | 102 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() 1150 st->clk_freq = st->info->int_clk * 1000; in adis16475_config_sync_mode() 1180 st->clk_freq = clk_get_rate(clk); in adis16475_config_sync_mode() [all …]
|
D | adis16480.c | 170 unsigned int clk_freq; member 329 unsigned int t, sample_rate = st->clk_freq; in adis16480_set_freq() 353 unsigned long scaled_rate = lcm(st->clk_freq, t); in adis16480_set_freq() 362 scaled_rate = st->chip_info->int_clk / st->clk_freq * st->clk_freq; in adis16480_set_freq() 377 scaled_rate = roundup(4000000, st->clk_freq); in adis16480_set_freq() 379 sync_scale = scaled_rate / st->clk_freq; in adis16480_set_freq() 405 unsigned int freq, sample_rate = st->clk_freq; in adis16480_get_freq() 416 sample_rate = st->clk_freq * sync_scale; in adis16480_get_freq() 1458 st->clk_freq = clk_get_rate(st->ext_clk); in adis16480_probe() 1459 st->clk_freq *= 1000; /* micro */ in adis16480_probe() [all …]
|
/drivers/watchdog/ |
D | visconti_wdt.c | 127 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()
|
/drivers/iio/adc/ |
D | stm32-dfsdm-core.c | 219 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()
|
/drivers/net/mdio/ |
D | mdio-bcm-unimac.c | 44 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()
|
/drivers/bus/ |
D | sunxi-rsb.c | 131 u32 clk_freq; member 681 clk_div = p_clk_freq / rsb->clk_freq / 2; in sunxi_rsb_hw_init() 750 u32 clk_freq = 3000000; in sunxi_rsb_probe() local 753 of_property_read_u32(np, "clock-frequency", &clk_freq); in sunxi_rsb_probe() 754 if (clk_freq > RSB_MAX_FREQ) { in sunxi_rsb_probe() 757 clk_freq); in sunxi_rsb_probe() 766 rsb->clk_freq = clk_freq; in sunxi_rsb_probe()
|
/drivers/net/wireless/ti/wl18xx/ |
D | main.c | 712 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 …]
|
/drivers/thermal/st/ |
D | stm_thermal.c | 202 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()
|
/drivers/media/dvb-frontends/ |
D | mn88443x.c | 192 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()
|
/drivers/staging/iio/frequency/ |
D | ad9834.c | 112 unsigned long clk_freq; in ad9834_write_frequency() local 115 clk_freq = clk_get_rate(st->mclk); in ad9834_write_frequency() 117 if (fout > (clk_freq / 2)) in ad9834_write_frequency() 120 regval = ad9834_calc_freqreg(clk_freq, fout); in ad9834_write_frequency()
|
/drivers/media/pci/cx25821/ |
D | cx25821-cards.c | 24 .clk_freq = 0,
|
/drivers/scsi/ |
D | mac53c94.c | 49 int clk_freq; member 134 writeb(CLKF_VAL(state->clk_freq), ®s->clk_factor); in mac53c94_init() 459 state->clk_freq = 25000000; in mac53c94_probe() 461 state->clk_freq = *(int *)clkprop; in mac53c94_probe()
|
/drivers/media/pci/cobalt/ |
D | m00473_freewheel_memmap_package.h | 21 uint32_t clk_freq; /* Reg 0x0018 */ member
|
/drivers/gpu/drm/amd/display/dmub/inc/ |
D | dmub_trace_buffer.h | 64 uint32_t clk_freq; member
|
/drivers/media/i2c/ |
D | st-mipid02.c | 950 u32 clk_freq; in mipid02_probe() local 969 clk_freq = clk_get_rate(bridge->xclk); in mipid02_probe() 970 if (clk_freq < 6000000 || clk_freq > 27000000) { in mipid02_probe() 972 clk_freq); in mipid02_probe()
|