/drivers/thermal/ |
D | intel_powerclamp.c | 264 static unsigned int get_compensation(int ratio) in get_compensation() argument 269 if (ratio == 1 && in get_compensation() 270 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation() 271 cal_data[ratio + 1].confidence >= CONFIDENCE_OK && in get_compensation() 272 cal_data[ratio + 2].confidence >= CONFIDENCE_OK) { in get_compensation() 273 comp = (cal_data[ratio].steady_comp + in get_compensation() 274 cal_data[ratio + 1].steady_comp + in get_compensation() 275 cal_data[ratio + 2].steady_comp) / 3; in get_compensation() 276 } else if (ratio == MAX_TARGET_RATIO - 1 && in get_compensation() 277 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation() [all …]
|
/drivers/media/dvb-frontends/ |
D | ves1x93.c | 177 u32 ratio; in ves1x93_set_symbolrate() local 196 ratio = tmp / FIN; in ves1x93_set_symbolrate() 199 ratio = (ratio << 8) + tmp / FIN; in ves1x93_set_symbolrate() 202 ratio = (ratio << 8) + tmp / FIN; in ves1x93_set_symbolrate() 206 if (ratio < MUL/3) FNR = 0; in ves1x93_set_symbolrate() 207 if (ratio < (MUL*11)/50) FNR = 1; in ves1x93_set_symbolrate() 208 if (ratio < MUL/6) FNR = 2; in ves1x93_set_symbolrate() 209 if (ratio < MUL/9) FNR = 3; in ves1x93_set_symbolrate() 210 if (ratio < MUL/12) FNR = 4; in ves1x93_set_symbolrate() 211 if (ratio < (MUL*11)/200) FNR = 5; in ves1x93_set_symbolrate() [all …]
|
D | z0194a.h | 16 u32 srate, u32 ratio) in sharp_z0194a_set_symbol_rate() argument 36 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); in sharp_z0194a_set_symbol_rate() 37 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); in sharp_z0194a_set_symbol_rate() 38 stv0299_writereg(fe, 0x21, (ratio) & 0xf0); in sharp_z0194a_set_symbol_rate()
|
D | tda8083.c | 133 u32 ratio; in tda8083_set_symbolrate() local 149 ratio = tmp / srate; in tda8083_set_symbolrate() 152 ratio = (ratio << 8) + tmp / srate; in tda8083_set_symbolrate() 155 ratio = (ratio << 8) + tmp / srate; in tda8083_set_symbolrate() 157 dprintk("tda8083: ratio == %08x\n", (unsigned int) ratio); in tda8083_set_symbolrate() 160 tda8083_writereg (state, 0x02, (ratio >> 16) & 0xff); in tda8083_set_symbolrate() 161 tda8083_writereg (state, 0x03, (ratio >> 8) & 0xff); in tda8083_set_symbolrate() 162 tda8083_writereg (state, 0x04, (ratio ) & 0xff); in tda8083_set_symbolrate()
|
D | cx24110.c | 244 u32 ratio; in cx24110_set_symbolrate() local 290 ratio=(tmp/BDRI); in cx24110_set_symbolrate() 293 ratio=(ratio<<8)+(tmp/BDRI); in cx24110_set_symbolrate() 296 ratio=(ratio<<8)+(tmp/BDRI); in cx24110_set_symbolrate() 299 ratio=(ratio<<1)+(tmp/BDRI); in cx24110_set_symbolrate() 303 dprintk("ratio= %08x\n", ratio); in cx24110_set_symbolrate() 305 cx24110_writereg(state, 0x1, (ratio>>16)&0xff); in cx24110_set_symbolrate() 306 cx24110_writereg(state, 0x2, (ratio>>8)&0xff); in cx24110_set_symbolrate() 307 cx24110_writereg(state, 0x3, (ratio)&0xff); in cx24110_set_symbolrate()
|
D | bsbe1.h | 51 static int alps_bsbe1_set_symbol_rate(struct dvb_frontend* fe, u32 srate, u32 ratio) in alps_bsbe1_set_symbol_rate() argument 65 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); in alps_bsbe1_set_symbol_rate() 66 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); in alps_bsbe1_set_symbol_rate() 67 stv0299_writereg(fe, 0x21, (ratio ) & 0xf0); in alps_bsbe1_set_symbol_rate()
|
D | bsru6.h | 70 static int alps_bsru6_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ratio) in alps_bsru6_set_symbol_rate() argument 97 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); in alps_bsru6_set_symbol_rate() 98 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); in alps_bsru6_set_symbol_rate() 99 stv0299_writereg(fe, 0x21, ratio & 0xf0); in alps_bsru6_set_symbol_rate()
|
D | ves1820.c | 119 u32 ratio; in ves1820_set_symbolrate() local 164 ratio = (symbolrate << 4) / fin; in ves1820_set_symbolrate() 166 ratio = (ratio << 8) + tmp / fin; in ves1820_set_symbolrate() 168 ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, fin); in ves1820_set_symbolrate() 170 BDR = ratio; in ves1820_set_symbolrate()
|
D | tda10021.c | 155 u32 tmp, ratio; in tda10021_set_symbolrate() local 175 ratio = (symbolrate << 4) / FIN; in tda10021_set_symbolrate() 177 ratio = (ratio << 8) + tmp / FIN; in tda10021_set_symbolrate() 179 ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, FIN); in tda10021_set_symbolrate() 181 BDR = ratio; in tda10021_set_symbolrate()
|
D | cx24123.c | 457 u32 sample_rate, ratio, sample_gain; in cx24123_set_symbolrate() local 491 ratio = (u32) tmp; in cx24123_set_symbolrate() 495 cx24123_writereg(state, 0x08, (ratio >> 16) & 0x3f); in cx24123_set_symbolrate() 496 cx24123_writereg(state, 0x09, (ratio >> 8) & 0xff); in cx24123_set_symbolrate() 497 cx24123_writereg(state, 0x0a, ratio & 0xff); in cx24123_set_symbolrate() 505 srate, ratio, sample_rate, sample_gain); in cx24123_set_symbolrate()
|
/drivers/media/platform/omap3isp/ |
D | ispresizer.c | 311 const struct resizer_ratio *ratio) in resizer_set_ratio() argument 319 rgval |= ((ratio->horz - 1) << ISPRSZ_CNT_HRSZ_SHIFT) in resizer_set_ratio() 321 rgval |= ((ratio->vert - 1) << ISPRSZ_CNT_VRSZ_SHIFT) in resizer_set_ratio() 326 if (ratio->horz > MID_RESIZE_VALUE) in resizer_set_ratio() 332 if (ratio->vert > MID_RESIZE_VALUE) in resizer_set_ratio() 784 struct resizer_ratio *ratio) in resizer_calc_ratios() argument 809 ratio->vert = ((input->height - 4) * 256 + 255 - 16 - 32 * spv) in resizer_calc_ratios() 811 if (ratio->vert > MID_RESIZE_VALUE) in resizer_calc_ratios() 812 ratio->vert = ((input->height - 7) * 256 + 255 - 32 - 64 * spv) in resizer_calc_ratios() 814 ratio->vert = clamp_t(unsigned int, ratio->vert, in resizer_calc_ratios() [all …]
|
/drivers/media/platform/vsp1/ |
D | vsp1_uds.c | 58 static unsigned int uds_output_size(unsigned int input, unsigned int ratio) in uds_output_size() argument 60 if (ratio > 4096) { in uds_output_size() 64 mp = ratio / 4096; in uds_output_size() 67 return (input - 1) / mp * mp * 4096 / ratio + 1; in uds_output_size() 70 return (input - 1) * 4096 / ratio + 1; in uds_output_size() 91 static unsigned int uds_passband_width(unsigned int ratio) in uds_passband_width() argument 93 if (ratio >= 4096) { in uds_passband_width() 97 mp = ratio / 4096; in uds_passband_width() 100 return 64 * 4096 * mp / ratio; in uds_passband_width()
|
/drivers/ide/ |
D | pdc202xx_new.c | 308 long pll_input, pll_output, ratio; in init_chipset_pdcnew() local 366 ratio = pll_output / (pll_input / 1000); in init_chipset_pdcnew() 367 if (ratio < 8600L) { /* 8.6x */ in init_chipset_pdcnew() 370 } else if (ratio < 12900L) { /* 12.9x */ in init_chipset_pdcnew() 373 } else if (ratio < 16100L) { /* 16.1x */ in init_chipset_pdcnew() 376 } else if (ratio < 64000L) { /* 64x */ in init_chipset_pdcnew() 381 name, pci_name(dev), ratio); in init_chipset_pdcnew() 385 f = (ratio * (r + 2)) / 1000 - 2; in init_chipset_pdcnew() 387 DBG("F[%d] R[%d] ratio*1000[%ld]\n", f, r, ratio); in init_chipset_pdcnew()
|
/drivers/clk/sirf/ |
D | clk-common.c | 354 unsigned ratio, wait, hold; in dmn_clk_round_rate() local 358 ratio = fin / rate; in dmn_clk_round_rate() 360 if (ratio < 2) in dmn_clk_round_rate() 361 ratio = 2; in dmn_clk_round_rate() 362 if (ratio > BIT(bits + 1)) in dmn_clk_round_rate() 363 ratio = BIT(bits + 1); in dmn_clk_round_rate() 365 wait = (ratio >> 1) - 1; in dmn_clk_round_rate() 366 hold = ratio - wait - 2; in dmn_clk_round_rate() 376 unsigned ratio, wait, hold, reg; in dmn_clk_set_rate() local 380 ratio = fin / rate; in dmn_clk_set_rate() [all …]
|
/drivers/media/pci/mantis/ |
D | mantis_vp1033.c | 119 u32 srate, u32 ratio) in lgtdqcs001f_set_symbol_rate() argument 146 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); in lgtdqcs001f_set_symbol_rate() 147 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); in lgtdqcs001f_set_symbol_rate() 148 stv0299_writereg(fe, 0x21, ratio & 0xf0); in lgtdqcs001f_set_symbol_rate()
|
/drivers/staging/imx-drm/ |
D | imx-hdmi.c | 137 int ratio; member 194 unsigned int ratio) in hdmi_compute_n() argument 201 n = (ratio == 150) ? 9152 : 4576; in hdmi_compute_n() 203 n = (ratio == 150) ? 8192 : 4096; in hdmi_compute_n() 216 n = (ratio == 150) ? 17836 : 8918; in hdmi_compute_n() 223 n = (ratio == 150) ? 9152 : 6864; in hdmi_compute_n() 225 n = (ratio == 150) ? 8192 : 6144; in hdmi_compute_n() 229 n = (ratio == 150) ? 11648 : 5824; in hdmi_compute_n() 235 n = hdmi_compute_n(44100, pixel_clk, ratio) * 2; in hdmi_compute_n() 239 n = hdmi_compute_n(48000, pixel_clk, ratio) * 2; in hdmi_compute_n() [all …]
|
/drivers/ata/ |
D | pata_pdc2027x.c | 523 long ratio = pout_required / pll_clock_khz; in pdc_adjust_pll() local 547 if (ratio < 8600L) { /* 8.6x */ in pdc_adjust_pll() 550 } else if (ratio < 12900L) { /* 12.9x */ in pdc_adjust_pll() 553 } else if (ratio < 16100L) { /* 16.1x */ in pdc_adjust_pll() 556 } else if (ratio < 64000L) { /* 64x */ in pdc_adjust_pll() 560 printk(KERN_ERR DRV_NAME ": Invalid ratio %ld, give up!\n", ratio); in pdc_adjust_pll() 564 F = (ratio * (R+2)) / 1000 - 2; in pdc_adjust_pll() 572 PDPRINTK("F[%d] R[%d] ratio*1000[%ld]\n", F, R, ratio); in pdc_adjust_pll()
|
/drivers/pwm/ |
D | pwm-fsl-ftm.c | 116 unsigned long long ratio; in fsl_pwm_calculate_default_ps() local 131 ratio = 2 * cnt_rate - 1; in fsl_pwm_calculate_default_ps() 132 do_div(ratio, sys_rate); in fsl_pwm_calculate_default_ps() 133 fpc->clk_ps = ratio; in fsl_pwm_calculate_default_ps() 136 ratio = 4 * cnt_rate - 1; in fsl_pwm_calculate_default_ps() 137 do_div(ratio, sys_rate); in fsl_pwm_calculate_default_ps() 138 fpc->clk_ps = ratio; in fsl_pwm_calculate_default_ps()
|
/drivers/video/fbdev/ |
D | asiliantfb.c | 118 unsigned ratio; in asiliant_calc_dclk2() local 123 ratio = 1000000 / pixclock; in asiliant_calc_dclk2() 125 Ftarget = 1000000 * ratio + (1000000 * remainder) / pixclock; in asiliant_calc_dclk2() 132 ratio = Ftarget / Fref; in asiliant_calc_dclk2() 138 unsigned m = n * ratio + (n * remainder) / Fref; in asiliant_calc_dclk2() 228 unsigned long Ftarget, ratio, remainder; in asiliantfb_check_var() local 230 ratio = 1000000 / var->pixclock; in asiliantfb_check_var() 232 Ftarget = 1000000 * ratio + (1000000 * remainder) / var->pixclock; in asiliantfb_check_var()
|
/drivers/staging/iio/light/ |
D | tsl2583.c | 109 unsigned int ratio; member 199 u32 ratio; in taos_get_lux() local 272 ratio = (ch1 << 15) / ch0; in taos_get_lux() 275 p->ratio != 0 && p->ratio < ratio; p++) in taos_get_lux() 278 if (p->ratio == 0) { in taos_get_lux() 696 taos_device_lux[i].ratio, in taos_luxtable_show() 699 if (taos_device_lux[i].ratio == 0) { in taos_luxtable_show()
|
/drivers/cpufreq/ |
D | pmac32-cpufreq.c | 479 const u32 *freqs, *ratio; in pmac_cpufreq_init_MacRISC3() local 487 ratio = of_get_property(cpunode, "processor-to-bus-ratio*2", in pmac_cpufreq_init_MacRISC3() 489 if (ratio == NULL) { in pmac_cpufreq_init_MacRISC3() 507 low_freq = (low_freq * (*ratio)) / 2000; in pmac_cpufreq_init_MacRISC3() 508 hi_freq = (hi_freq * (*ratio)) / 2000; in pmac_cpufreq_init_MacRISC3()
|
D | speedstep-lib.c | 37 unsigned int ratio; /* Frequency Multiplier (x10) */ in pentium3_get_frequency() member 101 (msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100)); in pentium3_get_frequency() 103 return msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100; in pentium3_get_frequency()
|
D | longhaul.c | 430 unsigned int ratio; in longhaul_get_ranges() local 486 ratio = mults[j]; in longhaul_get_ranges() 487 if (ratio == -1) in longhaul_get_ranges() 489 if (ratio > maxmult || ratio < minmult) in longhaul_get_ranges() 491 longhaul_table[k].frequency = calc_speed(ratio); in longhaul_get_ranges()
|
/drivers/media/v4l2-core/ |
D | v4l2-dv-timings.c | 594 u8 ratio; in v4l2_calc_aspect_ratio() local 607 ratio = hor_landscape | vert_portrait; in v4l2_calc_aspect_ratio() 609 if (ratio == 79) { in v4l2_calc_aspect_ratio() 612 } else if (ratio == 34) { in v4l2_calc_aspect_ratio() 615 } else if (ratio == 68) { in v4l2_calc_aspect_ratio()
|
/drivers/media/usb/dvb-usb/ |
D | opera1.c | 188 u32 ratio) in opera1_stv0299_set_symbol_rate() argument 192 stv0299_writereg(fe, REG_1F_SYMBOLRATE_BYTE0, (ratio >> 16) & 0xff); in opera1_stv0299_set_symbol_rate() 193 stv0299_writereg(fe, REG_20_SYMBOLRATE_BYTE1, (ratio >> 8) & 0xff); in opera1_stv0299_set_symbol_rate() 194 stv0299_writereg(fe, REG_21_SYMBOLRATE_BYTE2, (ratio) & 0xf0); in opera1_stv0299_set_symbol_rate()
|