/kernel/linux/linux-6.6/drivers/net/wireless/realtek/rtw88/ |
H A D | util.c | 82 void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss) in rtw_desc_to_mcsrate() argument 84 if (rate <= DESC_RATE54M) in rtw_desc_to_mcsrate() 87 if (rate >= DESC_RATEVHT1SS_MCS0 && in rtw_desc_to_mcsrate() 88 rate <= DESC_RATEVHT1SS_MCS9) { in rtw_desc_to_mcsrate() 90 *mcs = rate - DESC_RATEVHT1SS_MCS0; in rtw_desc_to_mcsrate() 91 } else if (rate >= DESC_RATEVHT2SS_MCS0 && in rtw_desc_to_mcsrate() 92 rate <= DESC_RATEVHT2SS_MCS9) { in rtw_desc_to_mcsrate() 94 *mcs = rate - DESC_RATEVHT2SS_MCS0; in rtw_desc_to_mcsrate() 95 } else if (rate >= DESC_RATEVHT3SS_MCS0 && in rtw_desc_to_mcsrate() 96 rate < in rtw_desc_to_mcsrate() [all...] |
/kernel/linux/linux-5.10/drivers/clk/qcom/ |
H A D | clk-rcg2.c | 141 * Calculate m/n:d rate 144 * rate = ----------- x --- 148 calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 hid_div) in calc_rate() argument 151 rate = mult_frac(rate, 2, hid_div + 1); in calc_rate() 154 rate = mult_frac(rate, m, n); in calc_rate() 156 return rate; in calc_rate() 190 unsigned long clk_flags, rate = req->rate; in _freq_tbl_determine_rate() local 316 __clk_rcg2_set_rate(struct clk_hw *hw, unsigned long rate, enum freq_policy policy) __clk_rcg2_set_rate() argument 339 clk_rcg2_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_rcg2_set_rate() argument 345 clk_rcg2_set_floor_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_rcg2_set_floor_rate() argument 351 clk_rcg2_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_rcg2_set_rate_and_parent() argument 357 clk_rcg2_set_floor_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_rcg2_set_floor_rate_and_parent() argument 412 clk_edp_pixel_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_edp_pixel_set_rate() argument 451 clk_edp_pixel_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_edp_pixel_set_rate_and_parent() argument 536 clk_byte_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_byte_set_rate() argument 552 clk_byte_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_byte_set_rate_and_parent() argument 577 unsigned long rate = req->rate; clk_byte2_determine_rate() local 593 clk_byte2_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_byte2_set_rate() argument 622 clk_byte2_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_byte2_set_rate_and_parent() argument 672 clk_pixel_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_pixel_set_rate() argument 714 clk_pixel_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_pixel_set_rate_and_parent() argument 780 clk_gfx3d_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_gfx3d_set_rate_and_parent() argument 796 clk_gfx3d_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_gfx3d_set_rate() argument 866 clk_rcg2_shared_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_rcg2_shared_set_rate() argument 886 clk_rcg2_shared_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_rcg2_shared_set_rate_and_parent() argument 1136 clk_rcg2_dp_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_rcg2_dp_set_rate() argument 1180 clk_rcg2_dp_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_rcg2_dp_set_rate_and_parent() argument [all...] |
/kernel/linux/linux-6.6/drivers/clk/qcom/ |
H A D | clk-rcg2.c | 152 * Calculate m/n:d rate 155 * rate = ----------- x --- 159 calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 hid_div) in calc_rate() argument 162 rate = mult_frac(rate, 2, hid_div + 1); in calc_rate() 165 rate = mult_frac(rate, m, n); in calc_rate() 167 return rate; in calc_rate() 210 unsigned long clk_flags, rate = req->rate; in _freq_tbl_determine_rate() local 351 __clk_rcg2_set_rate(struct clk_hw *hw, unsigned long rate, enum freq_policy policy) __clk_rcg2_set_rate() argument 374 clk_rcg2_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_rcg2_set_rate() argument 380 clk_rcg2_set_floor_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_rcg2_set_floor_rate() argument 386 clk_rcg2_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_rcg2_set_rate_and_parent() argument 392 clk_rcg2_set_floor_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_rcg2_set_floor_rate_and_parent() argument 542 clk_edp_pixel_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_edp_pixel_set_rate() argument 581 clk_edp_pixel_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_edp_pixel_set_rate_and_parent() argument 666 clk_byte_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_byte_set_rate() argument 682 clk_byte_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_byte_set_rate_and_parent() argument 707 unsigned long rate = req->rate; clk_byte2_determine_rate() local 723 clk_byte2_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_byte2_set_rate() argument 752 clk_byte2_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_byte2_set_rate_and_parent() argument 802 clk_pixel_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_pixel_set_rate() argument 844 clk_pixel_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_pixel_set_rate_and_parent() argument 933 clk_gfx3d_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_gfx3d_set_rate_and_parent() argument 953 clk_gfx3d_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_gfx3d_set_rate() argument 1023 clk_rcg2_shared_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_rcg2_shared_set_rate() argument 1044 clk_rcg2_shared_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_rcg2_shared_set_rate_and_parent() argument 1333 clk_rcg2_dp_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_rcg2_dp_set_rate() argument 1377 clk_rcg2_dp_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index) clk_rcg2_dp_set_rate_and_parent() argument [all...] |
/device/soc/rockchip/common/sdk_linux/drivers/gpu/drm/rockchip/ |
H A D | rockchip_vop2_clk.c | 74 * the rate of the dclk from the soc. 136 return (unsigned long)vop2_clk->rate; in clk_virtual_recalc_rate() 139 static long clk_virtual_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) in clk_virtual_round_rate() argument 143 vop2_clk->rate = rate; in clk_virtual_round_rate() 145 return rate; in clk_virtual_round_rate() 148 static int clk_virtual_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) in clk_virtual_set_rate() argument 179 cru_dbg("%s %ld(min: %ld max: %ld)\n", clk_hw_get_name(hw), req->rate, req->min_rate, req->max_rate); in vop2_clk_mux_determine_rate() 191 static int vop2_div_get_val(unsigned long rate, unsigned long parent_rate) in vop2_div_get_val() argument 195 div = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in vop2_div_get_val() 205 unsigned long rate; vop2_clk_div_recalc_rate() local 216 vop2_clk_div_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) vop2_clk_div_round_rate() argument 243 vop2_clk_div_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) vop2_clk_div_set_rate() argument [all...] |
/device/soc/rockchip/rk3588/kernel/drivers/gpu/drm/rockchip/ |
H A D | rockchip_vop2_clk.c | 85 * the rate of the dclk from the soc. 150 return (unsigned long)vop2_clk->rate; in clk_virtual_recalc_rate() 153 static long clk_virtual_round_rate(struct clk_hw *hw, unsigned long rate, in clk_virtual_round_rate() argument 158 vop2_clk->rate = rate; in clk_virtual_round_rate() 160 return rate; in clk_virtual_round_rate() 163 static int clk_virtual_set_rate(struct clk_hw *hw, unsigned long rate, in clk_virtual_set_rate() argument 197 clk_hw_get_name(hw), req->rate, req->min_rate, req->max_rate); in vop2_clk_mux_determine_rate() 209 static int vop2_div_get_val(unsigned long rate, unsigned long parent_rate) in vop2_div_get_val() argument 213 div = DIV_ROUND_UP_ULL((u64)parent_rate, rate); in vop2_div_get_val() 224 unsigned long rate; vop2_clk_div_recalc_rate() local 235 vop2_clk_div_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) vop2_clk_div_round_rate() argument 259 vop2_clk_div_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) vop2_clk_div_set_rate() argument [all...] |
/kernel/linux/linux-5.10/drivers/clk/actions/ |
H A D | owl-factor.c | 45 unsigned long rate, unsigned long parent_rate) in _get_table_val() 55 if ((unsigned long)calc_rate <= rate) { in _get_table_val() 68 struct clk_hw *hw, unsigned long rate, in owl_clk_val_best() 76 if (!rate) in owl_clk_val_best() 77 rate = 1; in owl_clk_val_best() 81 bestval = _get_table_val(clkt, rate, parent_rate); in owl_clk_val_best() 86 try_parent_rate = rate * clkt->div / clkt->mul; in owl_clk_val_best() 93 * It's the most ideal case if the requested rate can be in owl_clk_val_best() 95 * parent rate, so return the divider immediately. in owl_clk_val_best() 104 if (cur_rate <= rate in owl_clk_val_best() 44 _get_table_val(const struct clk_factor_table *table, unsigned long rate, unsigned long parent_rate) _get_table_val() argument 67 owl_clk_val_best(const struct owl_factor_hw *factor_hw, struct clk_hw *hw, unsigned long rate, unsigned long *best_parent_rate) owl_clk_val_best() argument 120 owl_factor_helper_round_rate(struct owl_clk_common *common, const struct owl_factor_hw *factor_hw, unsigned long rate, unsigned long *parent_rate) owl_factor_helper_round_rate() argument 134 owl_factor_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) owl_factor_round_rate() argument 149 unsigned long long int rate; owl_factor_helper_recalc_rate() local 184 owl_factor_helper_set_rate(const struct owl_clk_common *common, const struct owl_factor_hw *factor_hw, unsigned long rate, unsigned long parent_rate) owl_factor_helper_set_rate() argument 206 owl_factor_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) owl_factor_set_rate() argument [all...] |
/kernel/linux/linux-6.6/drivers/clk/actions/ |
H A D | owl-factor.c | 44 unsigned long rate, unsigned long parent_rate) in _get_table_val() 54 if ((unsigned long)calc_rate <= rate) { in _get_table_val() 67 struct clk_hw *hw, unsigned long rate, in owl_clk_val_best() 75 if (!rate) in owl_clk_val_best() 76 rate = 1; in owl_clk_val_best() 80 bestval = _get_table_val(clkt, rate, parent_rate); in owl_clk_val_best() 85 try_parent_rate = rate * clkt->div / clkt->mul; in owl_clk_val_best() 92 * It's the most ideal case if the requested rate can be in owl_clk_val_best() 94 * parent rate, so return the divider immediately. in owl_clk_val_best() 103 if (cur_rate <= rate in owl_clk_val_best() 43 _get_table_val(const struct clk_factor_table *table, unsigned long rate, unsigned long parent_rate) _get_table_val() argument 66 owl_clk_val_best(const struct owl_factor_hw *factor_hw, struct clk_hw *hw, unsigned long rate, unsigned long *best_parent_rate) owl_clk_val_best() argument 119 owl_factor_helper_round_rate(struct owl_clk_common *common, const struct owl_factor_hw *factor_hw, unsigned long rate, unsigned long *parent_rate) owl_factor_helper_round_rate() argument 133 owl_factor_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) owl_factor_round_rate() argument 148 unsigned long long int rate; owl_factor_helper_recalc_rate() local 183 owl_factor_helper_set_rate(const struct owl_clk_common *common, const struct owl_factor_hw *factor_hw, unsigned long rate, unsigned long parent_rate) owl_factor_helper_set_rate() argument 205 owl_factor_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) owl_factor_set_rate() argument [all...] |
/kernel/linux/linux-5.10/drivers/clk/imx/ |
H A D | clk-pllv3.c | 39 * @ref_clock: reference clock rate 119 static long clk_pllv3_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_round_rate() argument 124 return (rate >= parent_rate * 22) ? parent_rate * 22 : in clk_pllv3_round_rate() 128 static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_set_rate() argument 134 if (rate == parent_rate * 22) in clk_pllv3_set_rate() 136 else if (rate == parent_rate * 20) in clk_pllv3_set_rate() 167 static long clk_pllv3_sys_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_sys_round_rate() argument 175 if (rate > max_rate) in clk_pllv3_sys_round_rate() 176 rate = max_rate; in clk_pllv3_sys_round_rate() 177 else if (rate < min_rat in clk_pllv3_sys_round_rate() 184 clk_pllv3_sys_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_pllv3_sys_set_rate() argument 228 clk_pllv3_av_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) clk_pllv3_av_round_rate() argument 260 clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_pllv3_av_set_rate() argument 320 clk_pllv3_vf610_rate_to_mf( unsigned long parent_rate, unsigned long rate) clk_pllv3_vf610_rate_to_mf() argument 357 clk_pllv3_vf610_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) clk_pllv3_vf610_round_rate() argument 365 clk_pllv3_vf610_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_pllv3_vf610_set_rate() argument [all...] |
/kernel/linux/linux-6.6/drivers/clk/imx/ |
H A D | clk-pllv3.c | 40 * @ref_clock: reference clock rate 120 static long clk_pllv3_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_round_rate() argument 125 return (rate >= parent_rate * 22) ? parent_rate * 22 : in clk_pllv3_round_rate() 129 static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_set_rate() argument 135 if (rate == parent_rate * 22) in clk_pllv3_set_rate() 137 else if (rate == parent_rate * 20) in clk_pllv3_set_rate() 168 static long clk_pllv3_sys_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_sys_round_rate() argument 176 if (rate > max_rate) in clk_pllv3_sys_round_rate() 177 rate = max_rate; in clk_pllv3_sys_round_rate() 178 else if (rate < min_rat in clk_pllv3_sys_round_rate() 185 clk_pllv3_sys_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_pllv3_sys_set_rate() argument 229 clk_pllv3_av_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) clk_pllv3_av_round_rate() argument 261 clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_pllv3_av_set_rate() argument 321 clk_pllv3_vf610_rate_to_mf( unsigned long parent_rate, unsigned long rate) clk_pllv3_vf610_rate_to_mf() argument 358 clk_pllv3_vf610_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) clk_pllv3_vf610_round_rate() argument 366 clk_pllv3_vf610_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_pllv3_vf610_set_rate() argument [all...] |
/kernel/linux/linux-5.10/drivers/clk/ |
H A D | clk-si5351.c | 270 unsigned long rate; in si5351_clkin_recalc_rate() local 273 rate = parent_rate; in si5351_clkin_recalc_rate() 276 rate /= 8; in si5351_clkin_recalc_rate() 279 rate /= 4; in si5351_clkin_recalc_rate() 282 rate /= 2; in si5351_clkin_recalc_rate() 290 dev_dbg(&drvdata->client->dev, "%s - clkin div = %d, rate = %lu\n", in si5351_clkin_recalc_rate() 291 __func__, (1 << (idiv >> 6)), rate); in si5351_clkin_recalc_rate() 293 return rate; in si5351_clkin_recalc_rate() 326 static int si5351_vxco_set_rate(struct clk_hw *hw, unsigned long rate, in si5351_vxco_set_rate() argument 421 unsigned long long rate; in si5351_pll_recalc_rate() local 445 si5351_pll_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) si5351_pll_round_rate() argument 502 si5351_pll_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) si5351_pll_set_rate() argument 605 unsigned long long rate; si5351_msynth_recalc_rate() local 643 si5351_msynth_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) si5351_msynth_round_rate() argument 755 si5351_msynth_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) si5351_msynth_set_rate() argument 1028 si5351_clkout_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) si5351_clkout_round_rate() argument 1081 si5351_clkout_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) si5351_clkout_set_rate() argument [all...] |
H A D | clk-multiplier.c | 32 unsigned long rate, in __get_mult() 36 return DIV_ROUND_CLOSEST(rate, parent_rate); in __get_mult() 38 return rate / parent_rate; in __get_mult() 56 static bool __is_best_rate(unsigned long rate, unsigned long new, in __is_best_rate() argument 60 return abs(rate - new) < abs(rate - best); in __is_best_rate() 62 return new >= rate && new < best; in __is_best_rate() 65 static unsigned long __bestmult(struct clk_hw *hw, unsigned long rate, in __bestmult() argument 76 bestmult = rate / orig_parent_rate; in __bestmult() 91 if (rate in __bestmult() 31 __get_mult(struct clk_multiplier *mult, unsigned long rate, unsigned long parent_rate) __get_mult() argument 115 clk_multiplier_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) clk_multiplier_round_rate() argument 125 clk_multiplier_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_multiplier_set_rate() argument [all...] |
H A D | clk-vt8500.c | 131 static long vt8500_dclk_round_rate(struct clk_hw *hw, unsigned long rate, in vt8500_dclk_round_rate() argument 137 if (rate == 0) in vt8500_dclk_round_rate() 140 divisor = *prate / rate; in vt8500_dclk_round_rate() 142 /* If prate / rate would be decimal, incr the divisor */ in vt8500_dclk_round_rate() 143 if (rate * divisor < *prate) in vt8500_dclk_round_rate() 157 static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate, in vt8500_dclk_set_rate() argument 164 if (rate == 0) in vt8500_dclk_set_rate() 167 divisor = parent_rate / rate; in vt8500_dclk_set_rate() 350 static int vt8500_find_pll_bits(unsigned long rate, unsigned long parent_rate, in vt8500_find_pll_bits() argument 356 if ((rate < parent_rat in vt8500_find_pll_bits() 389 wm8650_find_pll_bits(unsigned long rate, unsigned long parent_rate, u32 *multiplier, u32 *divisor1, u32 *divisor2) wm8650_find_pll_bits() argument 452 wm8750_find_pll_bits(unsigned long rate, unsigned long parent_rate, u32 *filter, u32 *multiplier, u32 *divisor1, u32 *divisor2) wm8750_find_pll_bits() argument 500 wm8850_find_pll_bits(unsigned long rate, unsigned long parent_rate, u32 *multiplier, u32 *divisor1, u32 *divisor2) wm8850_find_pll_bits() argument 546 vtwm_pll_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) vtwm_pll_set_rate() argument 597 vtwm_pll_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) vtwm_pll_round_rate() argument [all...] |
/kernel/linux/linux-5.10/sound/usb/ |
H A D | format.c | 160 static int set_fixed_rate(struct audioformat *fp, int rate, int rate_bits) in set_fixed_rate() argument 167 fp->rate_min = rate; in set_fixed_rate() 168 fp->rate_max = rate; in set_fixed_rate() 170 fp->rate_table[0] = rate; in set_fixed_rate() 181 * @offset: the start offset of descriptor pointing the rate type 198 * build the rate table and bitmap flags in parse_audio_format_rates_v1() 210 unsigned int rate = combine_triple(&fmt[idx]); in parse_audio_format_rates_v1() local 211 if (!rate) in parse_audio_format_rates_v1() 216 if (rate == 48000 && nr_rates == 1 && in parse_audio_format_rates_v1() 222 rate in parse_audio_format_rates_v1() 269 s1810c_valid_sample_rate(struct audioformat *fp, unsigned int rate) s1810c_valid_sample_rate() argument 293 focusrite_valid_sample_rate(struct snd_usb_audio *chip, struct audioformat *fp, unsigned int rate) focusrite_valid_sample_rate() argument 352 unsigned int rate; parse_uac2_sample_rate_range() local [all...] |
/kernel/linux/linux-6.6/sound/soc/sof/ |
H A D | ipc3-pcm.c | 72 pcm.params.rate = params_rate(params); in sof_ipc3_pcm_hw_params() 215 struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); in sof_ipc3_pcm_dai_link_fixup() local 252 /* read rate and channels from topology */ in sof_ipc3_pcm_dai_link_fixup() 258 rate->min = private->dai_config[dai->current_config].ssp.fsync_rate; in sof_ipc3_pcm_dai_link_fixup() 259 rate->max = private->dai_config[dai->current_config].ssp.fsync_rate; in sof_ipc3_pcm_dai_link_fixup() 263 dev_dbg(component->dev, "rate_min: %d rate_max: %d\n", rate->min, rate->max); in sof_ipc3_pcm_dai_link_fixup() 297 rate->min = private->dai_config->esai.fsync_rate; in sof_ipc3_pcm_dai_link_fixup() 298 rate->max = private->dai_config->esai.fsync_rate; in sof_ipc3_pcm_dai_link_fixup() 302 dev_dbg(component->dev, "rate_min: %d rate_max: %d\n", rate in sof_ipc3_pcm_dai_link_fixup() [all...] |
/kernel/linux/linux-5.10/drivers/clocksource/ |
H A D | timer-integrator-ap.c | 30 unsigned long rate = inrate; in integrator_clocksource_init() local 33 if (rate >= 1500000) { in integrator_clocksource_init() 34 rate /= 16; in integrator_clocksource_init() 42 rate, 200, 16, clocksource_mmio_readl_down); in integrator_clocksource_init() 47 sched_clock_register(integrator_read_sched_clock, 16, rate); in integrator_clocksource_init() 129 unsigned long rate = inrate; in integrator_clockevent_init() local 135 if (rate > 0x100000 * HZ) { in integrator_clockevent_init() 136 rate /= 256; in integrator_clockevent_init() 138 } else if (rate > 0x10000 * HZ) { in integrator_clockevent_init() 139 rate / in integrator_clockevent_init() 165 unsigned long rate; integrator_ap_timer_init_of() local [all...] |
/kernel/linux/linux-5.10/drivers/clk/tegra/ |
H A D | clk-tegra-super-cclk.c | 41 static int cclk_super_set_rate(struct clk_hw *hw, unsigned long rate, in cclk_super_set_rate() argument 44 return tegra_clk_super_ops.set_rate(hw, rate, parent_rate); in cclk_super_set_rate() 63 long rate = req->rate; in cclk_super_determine_rate() local 74 if (rate <= pllp_rate) { in cclk_super_determine_rate() 76 rate = pllp_rate; in cclk_super_determine_rate() 78 rate = tegra_clk_super_ops.round_rate(hw, rate, in cclk_super_determine_rate() 83 req->rate = rate; in cclk_super_determine_rate() [all...] |
/kernel/linux/linux-6.6/drivers/clk/ |
H A D | clk-multiplier.c | 32 unsigned long rate, in __get_mult() 36 return DIV_ROUND_CLOSEST(rate, parent_rate); in __get_mult() 38 return rate / parent_rate; in __get_mult() 56 static bool __is_best_rate(unsigned long rate, unsigned long new, in __is_best_rate() argument 60 return abs(rate - new) < abs(rate - best); in __is_best_rate() 62 return new >= rate && new < best; in __is_best_rate() 65 static unsigned long __bestmult(struct clk_hw *hw, unsigned long rate, in __bestmult() argument 76 bestmult = rate / orig_parent_rate; in __bestmult() 91 if (rate in __bestmult() 31 __get_mult(struct clk_multiplier *mult, unsigned long rate, unsigned long parent_rate) __get_mult() argument 115 clk_multiplier_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) clk_multiplier_round_rate() argument 125 clk_multiplier_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) clk_multiplier_set_rate() argument [all...] |
H A D | clk-vt8500.c | 131 static long vt8500_dclk_round_rate(struct clk_hw *hw, unsigned long rate, in vt8500_dclk_round_rate() argument 137 if (rate == 0) in vt8500_dclk_round_rate() 140 divisor = *prate / rate; in vt8500_dclk_round_rate() 142 /* If prate / rate would be decimal, incr the divisor */ in vt8500_dclk_round_rate() 143 if (rate * divisor < *prate) in vt8500_dclk_round_rate() 157 static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate, in vt8500_dclk_set_rate() argument 164 if (rate == 0) in vt8500_dclk_set_rate() 167 divisor = parent_rate / rate; in vt8500_dclk_set_rate() 350 static int vt8500_find_pll_bits(unsigned long rate, unsigned long parent_rate, in vt8500_find_pll_bits() argument 356 if ((rate < parent_rat in vt8500_find_pll_bits() 389 wm8650_find_pll_bits(unsigned long rate, unsigned long parent_rate, u32 *multiplier, u32 *divisor1, u32 *divisor2) wm8650_find_pll_bits() argument 452 wm8750_find_pll_bits(unsigned long rate, unsigned long parent_rate, u32 *filter, u32 *multiplier, u32 *divisor1, u32 *divisor2) wm8750_find_pll_bits() argument 500 wm8850_find_pll_bits(unsigned long rate, unsigned long parent_rate, u32 *multiplier, u32 *divisor1, u32 *divisor2) wm8850_find_pll_bits() argument 546 vtwm_pll_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) vtwm_pll_set_rate() argument 597 vtwm_pll_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate) vtwm_pll_round_rate() argument [all...] |
/kernel/linux/linux-6.6/drivers/clocksource/ |
H A D | timer-integrator-ap.c | 30 unsigned long rate = inrate; in integrator_clocksource_init() local 33 if (rate >= 1500000) { in integrator_clocksource_init() 34 rate /= 16; in integrator_clocksource_init() 42 rate, 200, 16, clocksource_mmio_readl_down); in integrator_clocksource_init() 47 sched_clock_register(integrator_read_sched_clock, 16, rate); in integrator_clocksource_init() 129 unsigned long rate = inrate; in integrator_clockevent_init() local 135 if (rate > 0x100000 * HZ) { in integrator_clockevent_init() 136 rate /= 256; in integrator_clockevent_init() 138 } else if (rate > 0x10000 * HZ) { in integrator_clockevent_init() 139 rate / in integrator_clockevent_init() 165 unsigned long rate; integrator_ap_timer_init_of() local [all...] |
/kernel/linux/linux-5.10/drivers/clk/mmp/ |
H A D | clk-frac.c | 31 u64 rate = 0, prev_rate; in clk_factor_round_rate() local 35 prev_rate = rate; in clk_factor_round_rate() 36 rate = *prate; in clk_factor_round_rate() 37 rate *= factor->ftbl[i].den; in clk_factor_round_rate() 38 do_div(rate, factor->ftbl[i].num * factor->masks->factor); in clk_factor_round_rate() 40 if (rate > drate) in clk_factor_round_rate() 44 return rate; in clk_factor_round_rate() 46 if ((drate - prev_rate) > (rate - drate)) in clk_factor_round_rate() 47 return rate; in clk_factor_round_rate() 59 u64 rate; in clk_factor_recalc_rate() local 88 u64 rate = 0; clk_factor_set_rate() local [all...] |
/kernel/linux/linux-5.10/drivers/clk/pxa/ |
H A D | clk-pxa.c | 211 unsigned long rate; in pxa2xx_determine_rate() local 214 rate = freqs[i].cpll; in pxa2xx_determine_rate() 215 if (rate == req->rate) in pxa2xx_determine_rate() 217 if (rate < req->min_rate) in pxa2xx_determine_rate() 219 if (rate > req->max_rate) in pxa2xx_determine_rate() 221 if (rate <= req->rate) in pxa2xx_determine_rate() 223 if ((rate >= req->rate) in pxa2xx_determine_rate() [all...] |
/kernel/linux/linux-5.10/drivers/clk/sunxi-ng/ |
H A D | ccu_nk.c | 18 static void ccu_nk_find_best(unsigned long parent, unsigned long rate, in ccu_nk_find_best() argument 29 if (tmp_rate > rate) in ccu_nk_find_best() 32 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nk_find_best() 69 unsigned long rate, n, k; in ccu_nk_recalc_rate() local 86 rate = parent_rate * n * k; in ccu_nk_recalc_rate() 88 rate /= nk->fixed_post_div; in ccu_nk_recalc_rate() 90 return rate; in ccu_nk_recalc_rate() 93 static long ccu_nk_round_rate(struct clk_hw *hw, unsigned long rate, in ccu_nk_round_rate() argument 100 rate * in ccu_nk_round_rate() 116 ccu_nk_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) ccu_nk_set_rate() argument [all...] |
/kernel/linux/linux-6.6/drivers/clk/pxa/ |
H A D | clk-pxa.c | 218 unsigned long rate; in pxa2xx_determine_rate() local 221 rate = freqs[i].cpll; in pxa2xx_determine_rate() 222 if (rate == req->rate) in pxa2xx_determine_rate() 224 if (rate < req->min_rate) in pxa2xx_determine_rate() 226 if (rate > req->max_rate) in pxa2xx_determine_rate() 228 if (rate <= req->rate) in pxa2xx_determine_rate() 230 if ((rate >= req->rate) in pxa2xx_determine_rate() [all...] |
/kernel/linux/linux-6.6/drivers/clk/sunxi-ng/ |
H A D | ccu_nk.c | 18 static unsigned long ccu_nk_find_best(unsigned long parent, unsigned long rate, in ccu_nk_find_best() argument 29 if (tmp_rate > rate) in ccu_nk_find_best() 32 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nk_find_best() 71 unsigned long rate, n, k; in ccu_nk_recalc_rate() local 88 rate = parent_rate * n * k; in ccu_nk_recalc_rate() 90 rate /= nk->fixed_post_div; in ccu_nk_recalc_rate() 92 return rate; in ccu_nk_recalc_rate() 95 static long ccu_nk_round_rate(struct clk_hw *hw, unsigned long rate, in ccu_nk_round_rate() argument 102 rate * in ccu_nk_round_rate() 117 ccu_nk_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) ccu_nk_set_rate() argument [all...] |
/kernel/linux/linux-6.6/drivers/clk/mmp/ |
H A D | clk-frac.c | 28 u64 rate = 0, prev_rate; in clk_factor_round_rate() local 32 prev_rate = rate; in clk_factor_round_rate() 33 rate = *prate; in clk_factor_round_rate() 34 rate *= factor->ftbl[i].den; in clk_factor_round_rate() 35 do_div(rate, factor->ftbl[i].num * factor->masks->factor); in clk_factor_round_rate() 37 if (rate > drate) in clk_factor_round_rate() 41 return rate; in clk_factor_round_rate() 43 if ((drate - prev_rate) > (rate - drate)) in clk_factor_round_rate() 44 return rate; in clk_factor_round_rate() 56 u64 rate; in clk_factor_recalc_rate() local 85 u64 rate = 0; clk_factor_set_rate() local [all...] |