/kernel/linux/linux-5.10/drivers/iio/adc/ |
D | qcom-vadc-common.c | 282 const struct vadc_prescale_ratio *prescale, 286 const struct vadc_prescale_ratio *prescale, 290 const struct vadc_prescale_ratio *prescale, 294 const struct vadc_prescale_ratio *prescale, 298 const struct vadc_prescale_ratio *prescale, 302 const struct vadc_prescale_ratio *prescale, 306 const struct vadc_prescale_ratio *prescale, 384 const struct vadc_prescale_ratio *prescale, in qcom_vadc_scale_volt() argument 392 voltage = voltage * prescale->den; in qcom_vadc_scale_volt() 393 result = div64_s64(voltage, prescale->num); in qcom_vadc_scale_volt() [all …]
|
D | qcom-vadc-common.h | 161 const struct vadc_prescale_ratio *prescale, 166 int (*scale_fn)(const struct vadc_prescale_ratio *prescale, 171 const struct vadc_prescale_ratio *prescale,
|
/kernel/linux/linux-5.10/drivers/clocksource/ |
D | ingenic-sysost.c | 97 unsigned int prescale; in ingenic_ost_percpu_timer_recalc_rate() local 99 prescale = readl(ost_clk->ost->base + info->ostccr_reg); in ingenic_ost_percpu_timer_recalc_rate() 101 prescale = (prescale & OSTCCR_PRESCALE1_MASK) >> OSTCCR_PRESCALE1_LSB; in ingenic_ost_percpu_timer_recalc_rate() 103 return parent_rate >> (prescale * 2); in ingenic_ost_percpu_timer_recalc_rate() 111 unsigned int prescale; in ingenic_ost_global_timer_recalc_rate() local 113 prescale = readl(ost_clk->ost->base + info->ostccr_reg); in ingenic_ost_global_timer_recalc_rate() 115 prescale = (prescale & OSTCCR_PRESCALE2_MASK) >> OSTCCR_PRESCALE2_LSB; in ingenic_ost_global_timer_recalc_rate() 117 return parent_rate >> (prescale * 2); in ingenic_ost_global_timer_recalc_rate() 122 u8 prescale; in ingenic_ost_get_prescale() local 124 for (prescale = 0; prescale < 2; prescale++) in ingenic_ost_get_prescale() [all …]
|
/kernel/linux/linux-5.10/drivers/pwm/ |
D | pwm-imx-tpm.c | 70 u8 prescale; member 93 u32 rate, prescale, period_count, clock_unit; in pwm_imx_tpm_round_state() local 100 prescale = 0; in pwm_imx_tpm_round_state() 102 prescale = ilog2(clock_unit) + 1 - PWM_IMX_TPM_MOD_WIDTH; in pwm_imx_tpm_round_state() 104 if ((!FIELD_FIT(PWM_IMX_TPM_SC_PS, prescale))) in pwm_imx_tpm_round_state() 106 p->prescale = prescale; in pwm_imx_tpm_round_state() 108 period_count = (clock_unit + ((1 << prescale) >> 1)) >> prescale; in pwm_imx_tpm_round_state() 112 tmp = (u64)period_count << prescale; in pwm_imx_tpm_round_state() 140 u32 rate, val, prescale; in pwm_imx_tpm_get_state() local 149 prescale = FIELD_GET(PWM_IMX_TPM_SC_PS, val); in pwm_imx_tpm_get_state() [all …]
|
D | pwm-sprd.c | 74 u32 val, duty, prescale; in sprd_pwm_get_state() local 104 prescale = val & SPRD_PWM_PRESCALE_MSK; in sprd_pwm_get_state() 105 tmp = (prescale + 1) * NSEC_PER_SEC * SPRD_PWM_MOD_MAX; in sprd_pwm_get_state() 110 tmp = (prescale + 1) * NSEC_PER_SEC * duty; in sprd_pwm_get_state() 122 u32 prescale, duty; in sprd_pwm_config() local 139 prescale = DIV_ROUND_CLOSEST_ULL(tmp, SPRD_PWM_MOD_MAX) - 1; in sprd_pwm_config() 140 if (prescale > SPRD_PWM_PRESCALE_MSK) in sprd_pwm_config() 141 prescale = SPRD_PWM_PRESCALE_MSK; in sprd_pwm_config() 151 sprd_pwm_write(spc, pwm->hwpwm, SPRD_PWM_PRESCALE, prescale); in sprd_pwm_config()
|
D | pwm-bcm-iproc.c | 86 u32 value, prescale; in iproc_pwmc_get_state() local 108 prescale = value >> IPROC_PWM_PRESCALE_SHIFT(pwm->hwpwm); in iproc_pwmc_get_state() 109 prescale &= IPROC_PWM_PRESCALE_MAX; in iproc_pwmc_get_state() 111 multi = NSEC_PER_SEC * (prescale + 1); in iproc_pwmc_get_state() 125 unsigned long prescale = IPROC_PWM_PRESCALE_MIN; in iproc_pwmc_apply() local 145 div = NSEC_PER_SEC * (prescale + 1); in iproc_pwmc_apply() 159 if (++prescale > IPROC_PWM_PRESCALE_MAX) in iproc_pwmc_apply() 168 value |= prescale << IPROC_PWM_PRESCALE_SHIFT(pwm->hwpwm); in iproc_pwmc_apply()
|
D | pwm-pxa.c | 65 unsigned long period_cycles, prescale, pv, dc; in pxa_pwm_config() local 78 prescale = (period_cycles - 1) / 1024; in pxa_pwm_config() 79 pv = period_cycles / (prescale + 1) - 1; in pxa_pwm_config() 81 if (prescale > 63) in pxa_pwm_config() 96 writel(prescale, pc->mmio_base + offset + PWMCR); in pxa_pwm_config()
|
D | pwm-vt8500.c | 77 unsigned long period_cycles, prescale, pv, dc; in vt8500_pwm_config() local 94 prescale = (period_cycles - 1) / 4096; in vt8500_pwm_config() 95 pv = period_cycles / (prescale + 1) - 1; in vt8500_pwm_config() 99 if (prescale > 1023) { in vt8500_pwm_config() 108 writel(prescale, vt8500->base + REG_SCALAR(pwm->hwpwm)); in vt8500_pwm_config()
|
D | pwm-spear.c | 82 unsigned long prescale = PWMCR_MIN_PRESCALE, pv, dc; in spear_pwm_config() local 98 div *= 1 + prescale; in spear_pwm_config() 113 if (++prescale > PWMCR_MAX_PRESCALE) in spear_pwm_config() 129 prescale << PWMCR_PRESCALE_SHIFT); in spear_pwm_config()
|
D | pwm-imx27.c | 218 unsigned long period_cycles, duty_cycles, prescale; in pwm_imx27_apply() local 234 prescale = period_cycles / 0x10000 + 1; in pwm_imx27_apply() 236 period_cycles /= prescale; in pwm_imx27_apply() 240 duty_cycles /= prescale; in pwm_imx27_apply() 274 cr = MX3_PWMCR_PRESCALER_SET(prescale) | in pwm_imx27_apply()
|
D | pwm-sti.c | 123 unsigned int *prescale) in sti_pwm_get_prescale() argument 149 *prescale = ps; in sti_pwm_get_prescale() 168 unsigned int ncfg, value, prescale = 0; in sti_pwm_config() local 204 ret = sti_pwm_get_prescale(pc, period_ns, &prescale); in sti_pwm_config() 208 value = prescale & PWM_PRESCALE_LOW_MASK; in sti_pwm_config() 214 value = (prescale & PWM_PRESCALE_HIGH_MASK) >> 4; in sti_pwm_config() 239 prescale, period_ns, duty_ns, value); in sti_pwm_config()
|
D | pwm-bcm-kona.c | 116 unsigned long prescale = PRESCALE_MIN, pc, dc; in kona_pwmc_config() local 134 div *= 1 + prescale; in kona_pwmc_config() 149 if (++prescale > PRESCALE_MAX) in kona_pwmc_config() 163 value |= prescale << PRESCALE_SHIFT(chan); in kona_pwmc_config()
|
/kernel/linux/linux-5.10/drivers/clk/ingenic/ |
D | tcu.c | 158 unsigned int prescale; in ingenic_tcu_recalc_rate() local 161 ret = regmap_read(tcu_clk->tcu->map, info->tcsr_reg, &prescale); in ingenic_tcu_recalc_rate() 164 prescale = (prescale & TCU_TCSR_PRESCALE_MASK) >> TCU_TCSR_PRESCALE_LSB; in ingenic_tcu_recalc_rate() 166 return parent_rate >> (prescale * 2); in ingenic_tcu_recalc_rate() 171 u8 prescale; in ingenic_tcu_get_prescale() local 173 for (prescale = 0; prescale < 5; prescale++) in ingenic_tcu_get_prescale() 174 if ((rate >> (prescale * 2)) <= req_rate) in ingenic_tcu_get_prescale() 175 return prescale; in ingenic_tcu_get_prescale() 184 u8 prescale; in ingenic_tcu_round_rate() local 189 prescale = ingenic_tcu_get_prescale(rate, req_rate); in ingenic_tcu_round_rate() [all …]
|
/kernel/linux/linux-5.10/drivers/i2c/busses/ |
D | i2c-kempld.c | 226 long prescale; in kempld_i2c_device_init() local 240 prescale = pld->pld_clock / (bus_frequency * 5) - 1000; in kempld_i2c_device_init() 242 prescale = pld->pld_clock / (bus_frequency * 4) - 3000; in kempld_i2c_device_init() 244 if (prescale < 0) in kempld_i2c_device_init() 245 prescale = 0; in kempld_i2c_device_init() 248 prescale_corr = prescale / 1000; in kempld_i2c_device_init() 249 if (prescale % 1000 >= 500) in kempld_i2c_device_init()
|
D | i2c-imx-lpi2c.c | 203 u8 prescale, filt, sethold, clkhi, clklo, datavd; in lpi2c_imx_config() local 216 for (prescale = 0; prescale <= 7; prescale++) { in lpi2c_imx_config() 217 clk_cycle = clk_rate / ((1 << prescale) * lpi2c_imx->bitrate) in lpi2c_imx_config() 225 if (prescale > 7) in lpi2c_imx_config() 233 temp = prescale | pincfg << 24; in lpi2c_imx_config()
|
/kernel/linux/linux-5.10/arch/powerpc/platforms/52xx/ |
D | mpc52xx_gpt.c | 392 u32 prescale; in mpc52xx_gpt_do_start() local 426 prescale = (clocks >> 16) + 1; in mpc52xx_gpt_do_start() 427 do_div(clocks, prescale); in mpc52xx_gpt_do_start() 430 prescale, clocks); in mpc52xx_gpt_do_start() 442 out_be32(&gpt->regs->count, prescale << 16 | clocks); in mpc52xx_gpt_do_start() 496 u64 prescale; in mpc52xx_gpt_timer_period() local 503 prescale = period >> 16; in mpc52xx_gpt_timer_period() 505 if (prescale == 0) in mpc52xx_gpt_timer_period() 506 prescale = 0x10000; in mpc52xx_gpt_timer_period() 507 period = period * prescale * 1000000000ULL; in mpc52xx_gpt_timer_period()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/radeon/ |
D | radeon_i2c.c | 242 u32 prescale = 0; in radeon_get_i2c_prescale() local 268 prescale = m | (n << 8); in radeon_get_i2c_prescale() 276 prescale = (((sclk * 10)/(4 * 128 * 100) + 1) << 8) + 128; in radeon_get_i2c_prescale() 291 prescale = (127 << 8) + ((sclk * 10) / (4 * 127 * i2c_clock)); in radeon_get_i2c_prescale() 293 prescale = (((sclk * 10)/(4 * 128 * 100) + 1) << 8) + 128; in radeon_get_i2c_prescale() 322 return prescale; in radeon_get_i2c_prescale() 337 u32 prescale; in r100_hw_i2c_xfer() local 345 prescale = radeon_get_i2c_prescale(rdev); in r100_hw_i2c_xfer() 347 reg = ((prescale << RADEON_I2C_PRESCALE_SHIFT) | in r100_hw_i2c_xfer() 590 u32 prescale; in r500_hw_i2c_xfer() local [all …]
|
/kernel/linux/linux-5.10/drivers/media/i2c/ |
D | saa717x.c | 807 int task, int prescale) in set_h_prescale() argument 833 if (vals[i].xpsc == prescale) in set_h_prescale() 987 int prescale, h_scale, v_scale; in saa717x_set_fmt() local 1008 prescale = SAA717X_NTSC_WIDTH / fmt->width; in saa717x_set_fmt() 1009 if (prescale == 0) in saa717x_set_fmt() 1010 prescale = 1; in saa717x_set_fmt() 1011 h_scale = 1024 * SAA717X_NTSC_WIDTH / prescale / fmt->width; in saa717x_set_fmt() 1016 set_h_prescale(sd, 0, prescale); in saa717x_set_fmt() 1017 set_h_prescale(sd, 1, prescale); in saa717x_set_fmt()
|
/kernel/linux/linux-5.10/drivers/staging/comedi/drivers/ |
D | dt3000.c | 345 unsigned int divider, base, prescale; in dt3k_ns_to_timer() local 350 for (prescale = 0; prescale < 16; prescale++) { in dt3k_ns_to_timer() 351 base = timer_base * (prescale + 1); in dt3k_ns_to_timer() 366 return (prescale << 16) | (divider); in dt3k_ns_to_timer() 370 prescale = 15; in dt3k_ns_to_timer() 371 base = timer_base * (prescale + 1); in dt3k_ns_to_timer() 374 return (prescale << 16) | (divider); in dt3k_ns_to_timer()
|
/kernel/linux/linux-5.10/drivers/spi/ |
D | spi-fsl-lpspi.c | 89 u8 prescale; member 263 temp |= fsl_lpspi->config.prescale << 27; in fsl_lpspi_set_cmd() 301 u8 prescale; in fsl_lpspi_set_bitrate() local 311 for (prescale = 0; prescale < 8; prescale++) { in fsl_lpspi_set_bitrate() 312 scldiv = perclk_rate / config.speed_hz / (1 << prescale) - 2; in fsl_lpspi_set_bitrate() 314 fsl_lpspi->config.prescale = prescale; in fsl_lpspi_set_bitrate() 326 perclk_rate, config.speed_hz, prescale, scldiv); in fsl_lpspi_set_bitrate()
|
D | spi-armada-3700.c | 222 u32 prescale; in a3700_spi_clock_set() local 224 prescale = DIV_ROUND_UP(clk_get_rate(a3700_spi->clk), speed_hz); in a3700_spi_clock_set() 230 if (prescale > 15) in a3700_spi_clock_set() 231 prescale = A3700_SPI_CLK_EVEN_OFFS + DIV_ROUND_UP(prescale, 2); in a3700_spi_clock_set() 236 val = val | (prescale & A3700_SPI_CLK_PRESCALE_MASK); in a3700_spi_clock_set() 239 if (prescale <= 2) { in a3700_spi_clock_set()
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/hwmon/ |
D | max6650.txt | 13 - maxim,fan-prescale : Pre-scaling value, as per datasheet [1]. Lower values 26 maxim,fan-prescale = <4>;
|
/kernel/linux/linux-5.10/drivers/media/pci/cobalt/ |
D | cobalt-i2c.c | 309 int prescale; in cobalt_i2c_init() local 315 prescale = ((ALT_CPU_FREQ) / (5 * I2C_FREQUENCY)) - 1; in cobalt_i2c_init() 344 iowrite8(prescale & 0xff, ®s->prerlo); in cobalt_i2c_init() 345 iowrite8((prescale >> 8) & 0xff, ®s->prerhi); in cobalt_i2c_init()
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/display/ |
D | cirrus,clps711x-fb.txt | 12 - ac-prescale : LCD AC bias frequency. This frequency is the required 31 ac-prescale = <17>;
|
/kernel/linux/linux-5.10/drivers/media/pci/cx88/ |
D | cx88-core.c | 740 static int set_pll(struct cx88_core *core, int prescale, u32 ofreq) in set_pll() argument 747 if (prescale < 2) in set_pll() 748 prescale = 2; in set_pll() 749 if (prescale > 5) in set_pll() 750 prescale = 5; in set_pll() 752 pll = ofreq * 8 * prescale * (u64)(1 << 20); in set_pll() 754 reg = (pll & 0x3ffffff) | (pre[prescale] << 26); in set_pll() 767 prescale, ofreq); in set_pll() 773 dprintk(1, "pll NOT locked [pre=%d,ofreq=%d]\n", prescale, ofreq); in set_pll()
|