/openbmc/linux/sound/firewire/digi00x/ |
H A D | digi00x-proc.c | 40 unsigned int rate; in proc_read_clock() local 46 if (snd_dg00x_stream_get_local_rate(dg00x, &rate) < 0) in proc_read_clock() 52 snd_iprintf(buf, "Sampling Rate: %d\n", rate); in proc_read_clock() 64 if (snd_dg00x_stream_get_external_rate(dg00x, &rate) >= 0) in proc_read_clock() 65 snd_iprintf(buf, "External sampling rate: %d\n", rate); in proc_read_clock()
|
/openbmc/linux/drivers/watchdog/ |
H A D | rza_wdt.c | 52 unsigned long rate = clk_get_rate(priv->clk); in rza_wdt_calc_timeout() local 56 ticks = DIV_ROUND_UP(timeout * rate, DIVIDER_4BIT); in rza_wdt_calc_timeout() 171 unsigned long rate; in rza_wdt_probe() local 186 rate = clk_get_rate(priv->clk); in rza_wdt_probe() 187 if (rate < 16384) { in rza_wdt_probe() 188 dev_err(dev, "invalid clock rate (%ld)\n", rate); in rza_wdt_probe() 199 priv->wdev.max_timeout = (DIVIDER_4BIT * U8_MAX) / rate; in rza_wdt_probe() 203 rate /= DIVIDER_3BIT; in rza_wdt_probe() 210 priv->wdev.max_hw_heartbeat_ms = (1000 * U8_MAX) / rate; in rza_wdt_probe()
|
/openbmc/linux/drivers/clocksource/ |
H A D | timer-lpc32xx.c | 158 unsigned long rate; in lpc32xx_clocksource_init() local 192 rate = clk_get_rate(clk); in lpc32xx_clocksource_init() 194 rate, 300, 32, clocksource_mmio_readl_up); in lpc32xx_clocksource_init() 201 lpc32xx_delay_timer.freq = rate; in lpc32xx_clocksource_init() 203 sched_clock_register(lpc32xx_read_sched_clock, 32, rate); in lpc32xx_clocksource_init() 219 unsigned long rate; in lpc32xx_clockevent_init() local 258 rate = clk_get_rate(clk); in lpc32xx_clockevent_init() 260 lpc32xx_clk_event_ddata.ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); in lpc32xx_clockevent_init() 262 rate, 1, -1); in lpc32xx_clockevent_init()
|
/openbmc/linux/kernel/time/ |
H A D | sched_clock.c | 42 unsigned long rate; member 164 sched_clock_register(u64 (*read)(void), int bits, unsigned long rate) in sched_clock_register() argument 172 if (cd.rate > rate) in sched_clock_register() 179 clocks_calc_mult_shift(&new_mult, &new_shift, rate, NSEC_PER_SEC, 3600); in sched_clock_register() 182 cd.rate = rate; in sched_clock_register() 211 r = rate; in sched_clock_register() 229 if (irqtime > 0 || (irqtime == -1 && rate >= 1000000)) in sched_clock_register()
|
/openbmc/linux/net/mac80211/ |
H A D | airtime.c | 474 const struct ieee80211_rate *rate; in ieee80211_calc_rx_airtime() local 487 rate = &sband->bitrates[status->rate_idx]; in ieee80211_calc_rx_airtime() 551 struct ieee80211_tx_rate *rate, in ieee80211_fill_rx_status() argument 560 if (rate->idx < 0 || !rate->count) in ieee80211_fill_rx_status() 575 if (rate->flags & IEEE80211_TX_RC_SHORT_GI) in ieee80211_fill_rx_status() 578 stat->rate_idx = rate->idx; in ieee80211_fill_rx_status() 579 if (rate->flags & IEEE80211_TX_RC_VHT_MCS) { in ieee80211_fill_rx_status() 582 stat->nss = ieee80211_rate_get_vht_nss(rate); in ieee80211_fill_rx_status() 593 struct ieee80211_tx_rate *rate, in ieee80211_calc_tx_airtime_rate() argument 621 duration += cur_duration * rate->count; in ieee80211_calc_tx_airtime() [all …]
|
/openbmc/u-boot/drivers/clk/aspeed/ |
H A D | clk_ast2600.c | 343 u32 rate = 0; in ast2600_get_hclk() local 376 u32 rate; in ast2600_get_bclk_rate() local 398 return (rate / apb_div); in ast2600_get_pclk1() 407 return (rate / apb_div); in ast2600_get_pclk2() 647 ulong rate = 0; in ast2600_clk_get_rate() local 703 return rate; in ast2600_clk_get_rate() 788 mpll.out = rate; in ast2600_configure_ddr() 1312 u32 rate = 0; in ast2600_enable_extsdclk() local 1366 u32 rate = 0; in ast2600_enable_extemmcclk() local 1622 unsigned long rate; in soc_clk_dump() local [all …]
|
/openbmc/linux/drivers/clk/ |
H A D | clk-scmi.c | 31 u64 rate; in scmi_clk_recalc_rate() local 34 ret = scmi_proto_clk_ops->rate_get(clk->ph, clk->id, &rate); in scmi_clk_recalc_rate() 37 return rate; in scmi_clk_recalc_rate() 40 static long scmi_clk_round_rate(struct clk_hw *hw, unsigned long rate, in scmi_clk_round_rate() argument 53 return rate; in scmi_clk_round_rate() 57 if (rate <= fmin) in scmi_clk_round_rate() 59 else if (rate >= fmax) in scmi_clk_round_rate() 62 ftmp = rate - fmin; in scmi_clk_round_rate() 69 static int scmi_clk_set_rate(struct clk_hw *hw, unsigned long rate, in scmi_clk_set_rate() argument 74 return scmi_proto_clk_ops->rate_set(clk->ph, clk->id, rate); in scmi_clk_set_rate()
|
H A D | clk-fractional-divider.c | 121 unsigned long rate, in clk_fractional_divider_general_approximation() argument 135 unsigned long scale = fls_long(*parent_rate / rate - 1); in clk_fractional_divider_general_approximation() 138 rate <<= scale - fd->nwidth; in clk_fractional_divider_general_approximation() 141 rational_best_approximation(rate, *parent_rate, in clk_fractional_divider_general_approximation() 146 static long clk_fd_round_rate(struct clk_hw *hw, unsigned long rate, in clk_fd_round_rate() argument 153 if (!rate || (!clk_hw_can_set_rate_parent(hw) && rate >= *parent_rate)) in clk_fd_round_rate() 157 fd->approximation(hw, rate, parent_rate, &m, &n); in clk_fd_round_rate() 159 clk_fractional_divider_general_approximation(hw, rate, parent_rate, &m, &n); in clk_fd_round_rate() 167 static int clk_fd_set_rate(struct clk_hw *hw, unsigned long rate, in clk_fd_set_rate() argument 176 rational_best_approximation(rate, parent_rate, in clk_fd_set_rate()
|
H A D | clk.c | 636 return abs(now - rate) < abs(best - rate); in mux_is_better_rate() 1556 long rate; in clk_core_determine_round_nolock() local 1584 req->rate = core->rate; in clk_core_determine_round_nolock() 1588 rate = core->ops->round_rate(core->hw, req->rate, in clk_core_determine_round_nolock() 1593 req->rate = rate; in clk_core_determine_round_nolock() 1617 req->rate = rate; in clk_core_init_rate_req() 1710 req->rate = parent_req.rate; in clk_core_round_rate_nolock() 1715 req->rate = core->rate; in clk_core_round_rate_nolock() 2704 rate = clamp(rate, min, max); in clk_set_rate_range_nolock() 4006 rate = parent->rate; in __clk_core_init() [all …]
|
/openbmc/linux/drivers/clk/qcom/ |
H A D | clk-hfpll.c | 37 unsigned long rate; in __clk_hfpll_init_once() local 39 rate = clk_hw_get_rate(hw); in __clk_hfpll_init_once() 42 if (hd->user_vco_mask && rate > hd->low_vco_max_rate) in __clk_hfpll_init_once() 137 req->rate = clamp(req->rate, hd->min_rate, hd->max_rate); in clk_hfpll_determine_rate() 139 rrate = DIV_ROUND_UP(req->rate, req->best_parent_rate) * req->best_parent_rate; in clk_hfpll_determine_rate() 143 req->rate = rrate; in clk_hfpll_determine_rate() 151 static int clk_hfpll_set_rate(struct clk_hw *hw, unsigned long rate, in clk_hfpll_set_rate() argument 161 l_val = rate / parent_rate; in clk_hfpll_set_rate() 172 if (rate <= hd->low_vco_max_rate) in clk_hfpll_set_rate()
|
/openbmc/linux/drivers/clk/actions/ |
H A D | owl-composite.h | 30 union owl_rate rate; member 42 .rate.div_hw = _div, \ 56 .rate.div_hw = _div, \ 71 .rate.factor_hw = _factor, \ 85 .rate.fix_fact_hw.mult = _mul, \ 86 .rate.fix_fact_hw.div = _div, \
|
/openbmc/linux/drivers/clk/imx/ |
H A D | clk-pllv1.c | 60 unsigned long rate; in clk_pllv1_recalc_rate() local 95 rate = parent_rate * 2; in clk_pllv1_recalc_rate() 96 rate /= pd + 1; in clk_pllv1_recalc_rate() 98 ull = (unsigned long long)rate * mfn_abs; in clk_pllv1_recalc_rate() 103 ull = (rate * mfi) - ull; in clk_pllv1_recalc_rate() 105 ull = (rate * mfi) + ull; in clk_pllv1_recalc_rate()
|
/openbmc/qemu/hw/misc/ |
H A D | omap_clk.c | 55 .rate = 12000000, 61 .rate = 32768, 350 .rate = 12000000, 358 .rate = 48000000, 366 .rate = 12000000, 375 .rate = 12000000, 391 .rate = 6000000, 538 .rate = 32768, 545 .rate = 32768, 564 .rate = 32768, [all …]
|
/openbmc/u-boot/drivers/sound/ |
H A D | max98095.c | 33 static int rate_value(int rate, u8 *value) in rate_value() argument 38 if (rate_table[i] >= rate) { in rate_value() 59 unsigned int rate, unsigned int bits_per_sample) in max98095_hw_params() argument 91 if (rate_value(rate, ®val)) { in max98095_hw_params() 93 __func__, rate); in max98095_hw_params() 96 priv->rate = rate; in max98095_hw_params() 102 if (rate < 50000) in max98095_hw_params() 314 priv->rate = -1U; in max98095_device_init() 424 static int max98095_set_params(struct udevice *dev, int interface, int rate, in max98095_set_params() argument 430 return max98095_do_init(priv, interface, rate, mclk_freq, in max98095_set_params()
|
/openbmc/linux/sound/pci/echoaudio/ |
H A D | layla24_dsp.c | 160 static int set_sample_rate(struct echoaudio *chip, u32 rate) in set_sample_rate() argument 164 if (snd_BUG_ON(rate >= 50000 && in set_sample_rate() 173 chip->comm_page->sample_rate = cpu_to_le32(rate); in set_sample_rate() 174 chip->sample_rate = rate; in set_sample_rate() 184 switch (rate) { in set_sample_rate() 220 if (rate > 50000) { in set_sample_rate() 221 base_rate = rate >> 1; in set_sample_rate() 224 base_rate = rate; in set_sample_rate() 242 chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP ? */ in set_sample_rate() 243 chip->sample_rate = rate; in set_sample_rate() [all …]
|
/openbmc/linux/sound/soc/intel/skylake/ |
H A D | skl-nhlt.c | 101 unsigned long rate; in skl_get_ssp_clks() local 151 rate = channels * bps * fs; in skl_get_ssp_clks() 155 (sclk[id].rate_cfg[j].rate != 0); j++) { in skl_get_ssp_clks() 156 if (sclk[id].rate_cfg[j].rate == rate) { in skl_get_ssp_clks() 192 sclk[id].rate_cfg[rate_index].rate = rate; in skl_get_ssp_clks() 194 sclkfs[id].rate_cfg[rate_index].rate = rate; in skl_get_ssp_clks() 243 mclk[id].rate_cfg[0].rate = parent->rate/div_ratio; in skl_get_mclk()
|
/openbmc/linux/drivers/media/platform/microchip/ |
H A D | microchip-isc-clk.c | 143 unsigned long rate; in isc_clk_determine_rate() local 146 rate = DIV_ROUND_CLOSEST(parent_rate, div); in isc_clk_determine_rate() 147 diff = abs(req->rate - rate); in isc_clk_determine_rate() 150 best_rate = rate; in isc_clk_determine_rate() 156 if (!best_diff || rate < req->rate) in isc_clk_determine_rate() 173 req->rate = best_rate; in isc_clk_determine_rate() 198 unsigned long rate, in isc_clk_set_rate() argument 204 if (!rate) in isc_clk_set_rate() 207 div = DIV_ROUND_CLOSEST(parent_rate, rate); in isc_clk_set_rate()
|
/openbmc/linux/drivers/staging/media/deprecated/atmel/ |
H A D | atmel-isc-clk.c | 143 unsigned long rate; in isc_clk_determine_rate() local 146 rate = DIV_ROUND_CLOSEST(parent_rate, div); in isc_clk_determine_rate() 147 diff = abs(req->rate - rate); in isc_clk_determine_rate() 150 best_rate = rate; in isc_clk_determine_rate() 156 if (!best_diff || rate < req->rate) in isc_clk_determine_rate() 173 req->rate = best_rate; in isc_clk_determine_rate() 198 unsigned long rate, in isc_clk_set_rate() argument 204 if (!rate) in isc_clk_set_rate() 207 div = DIV_ROUND_CLOSEST(parent_rate, rate); in isc_clk_set_rate()
|
/openbmc/linux/drivers/iio/health/ |
H A D | Kconfig | 19 heart rate monitor and low-cost pulse oximeter. 25 tristate "TI AFE4404 heart rate and pulse oximeter sensor" 32 heart rate monitor and low-cost pulse oximeter. 38 tristate "MAX30100 heart rate and pulse oximeter sensor" 45 MAX30100 heart rate, and pulse oximeter sensor. 51 tristate "MAX30102 heart rate and pulse oximeter sensor" 58 MAX30102 heart rate, and pulse oximeter sensor.
|
/openbmc/linux/drivers/clk/at91/ |
H A D | clk-generated.c | 124 tmp_diff = abs(req->rate - tmp_rate); in clk_generated_best_diff() 146 if (gck->range.max && req->rate > gck->range.max) in clk_generated_determine_rate() 147 req->rate = gck->range.max; in clk_generated_determine_rate() 148 if (gck->range.min && req->rate < gck->range.min) in clk_generated_determine_rate() 149 req->rate = gck->range.min; in clk_generated_determine_rate() 165 div = DIV_ROUND_CLOSEST(parent_rate, req->rate); in clk_generated_determine_rate() 215 req->rate = best_rate; in clk_generated_determine_rate() 244 unsigned long rate, in clk_generated_set_rate() argument 250 if (!rate) in clk_generated_set_rate() 253 if (gck->range.max && rate > gck->range.max) in clk_generated_set_rate() [all …]
|
H A D | clk-pll.c | 148 mindiv = (parent_rate * PLL_MUL_MIN) / rate; in clk_pll_get_best_div_mul() 165 maxdiv = DIV_ROUND_UP(parent_rate * PLL_MUL_MAX(layout), rate); in clk_pll_get_best_div_mul() 183 tmpmul = DIV_ROUND_CLOSEST(rate, parent_rate / tmpdiv); in clk_pll_get_best_div_mul() 185 if (tmprate > rate) in clk_pll_get_best_div_mul() 186 remainder = tmprate - rate; in clk_pll_get_best_div_mul() 188 remainder = rate - tmprate; in clk_pll_get_best_div_mul() 234 static long clk_pll_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pll_round_rate() argument 239 return clk_pll_get_best_div_mul(pll, rate, *parent_rate, in clk_pll_round_rate() 243 static int clk_pll_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pll_set_rate() argument 252 ret = clk_pll_get_best_div_mul(pll, rate, parent_rate, in clk_pll_set_rate() [all …]
|
/openbmc/linux/sound/soc/codecs/ |
H A D | max98926.c | 248 int rate; member 252 .rate = 8000, 256 .rate = 11025, 260 .rate = 12000, 264 .rate = 16000, 268 .rate = 22050, 272 .rate = 24000, 276 .rate = 32000, 280 .rate = 44100, 284 .rate = 48000, [all …]
|
H A D | max98925.c | 206 int rate; member 211 .rate = 8000, 216 .rate = 11025, 221 .rate = 12000, 226 .rate = 16000, 231 .rate = 22050, 236 .rate = 24000, 241 .rate = 32000, 246 .rate = 44100, 251 .rate = 48000, [all …]
|
/openbmc/linux/arch/arm/boot/dts/nxp/lpc/ |
H A D | lpc4357-ea4357-devkit.dts | 174 slew-rate = <1>; 190 slew-rate = <1>; 199 slew-rate = <1>; 208 slew-rate = <1>; 217 slew-rate = <1>; 226 slew-rate = <1>; 235 slew-rate = <1>; 244 slew-rate = <1>; 253 slew-rate = <1>; 262 slew-rate = <1>; [all …]
|
/openbmc/linux/sound/soc/sh/rcar/ |
H A D | adg.c | 201 if (runtime->rate != in_rate) { in rsnd_adg_get_timesel_ratio() 204 } else if (runtime->rate != out_rate) { in rsnd_adg_get_timesel_ratio() 320 if (rate == adg->clkin_rate[i]) in rsnd_adg_clk_query() 326 if (rate == adg->brg_rate[ADG_HZ_441]) in rsnd_adg_clk_query() 329 if (rate == adg->brg_rate[ADG_HZ_48]) in rsnd_adg_clk_query() 357 if (0 == (rate % 8000)) in rsnd_adg_ssi_clk_try_start() 566 u32 rate, div; in rsnd_adg_get_clkout() local 568 rate = clk_get_rate(clk); in rsnd_adg_get_clkout() 570 if (0 == rate) /* not used */ in rsnd_adg_get_clkout() 579 div = rate / req_Hz[ADG_HZ_441]; in rsnd_adg_get_clkout() [all …]
|