/Linux-v5.4/drivers/pwm/ |
D | pwm-sun4i.c | 112 unsigned int prescaler; in sun4i_pwm_get_state() local 120 prescaler = 1; in sun4i_pwm_get_state() 122 prescaler = prescaler_table[PWM_REG_PRESCAL(val, pwm->hwpwm)]; in sun4i_pwm_get_state() 124 if (prescaler == 0) in sun4i_pwm_get_state() 140 tmp = prescaler * NSEC_PER_SEC * PWM_REG_DTY(val); in sun4i_pwm_get_state() 143 tmp = prescaler * NSEC_PER_SEC * PWM_REG_PRD(val); in sun4i_pwm_get_state() 152 unsigned int pval, prescaler = 0; in sun4i_pwm_calculate() local 158 prescaler = PWM_PRESCAL_MASK; in sun4i_pwm_calculate() 168 prescaler = 0; in sun4i_pwm_calculate() 171 if (prescaler == 0) { in sun4i_pwm_calculate() [all …]
|
D | pwm-renesas-tpu.c | 76 unsigned int prescaler; member 176 pwm->prescaler); in tpu_pwm_timer_start() 225 pwm->prescaler = 0; in tpu_pwm_request() 250 unsigned int prescaler; in tpu_pwm_config() local 263 for (prescaler = 0; prescaler < ARRAY_SIZE(prescalers); ++prescaler) { in tpu_pwm_config() 264 period = clk_rate / prescalers[prescaler] in tpu_pwm_config() 270 if (prescaler == ARRAY_SIZE(prescalers) || period == 0) { in tpu_pwm_config() 276 duty = clk_rate / prescalers[prescaler] in tpu_pwm_config() 286 clk_rate, prescalers[prescaler], period, duty); in tpu_pwm_config() 288 if (pwm->prescaler == prescaler && pwm->period == period) in tpu_pwm_config() [all …]
|
D | pwm-jz4740.c | 96 unsigned int prescaler = 0; in jz4740_pwm_apply() local 103 while (period > 0xffff && prescaler < 6) { in jz4740_pwm_apply() 105 ++prescaler; in jz4740_pwm_apply() 108 if (prescaler == 6) in jz4740_pwm_apply() 124 ctrl = JZ_TIMER_CTRL_PRESCALER(prescaler) | JZ_TIMER_CTRL_SRC_EXT | in jz4740_pwm_apply()
|
D | pwm-rockchip.c | 49 unsigned int prescaler; member 78 tmp *= pc->data->prescaler * NSEC_PER_SEC; in rockchip_pwm_get_state() 82 tmp *= pc->data->prescaler * NSEC_PER_SEC; in rockchip_pwm_get_state() 118 pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config() 121 duty = DIV_ROUND_CLOSEST_ULL(div, pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config() 234 .prescaler = 2, 247 .prescaler = 1, 261 .prescaler = 1, 275 .prescaler = 1,
|
D | pwm-stm32.c | 323 unsigned int prescaler = 0; in stm32_pwm_config() local 333 prescaler++; in stm32_pwm_config() 335 do_div(div, prescaler + 1); in stm32_pwm_config() 340 if (prescaler > MAX_TIM_PSC) in stm32_pwm_config() 353 if ((psc != prescaler) || (arr != prd - 1)) in stm32_pwm_config() 357 regmap_write(priv->regmap, TIM_PSC, prescaler); in stm32_pwm_config()
|
D | pwm-imx27.c | 122 u32 period, prescaler, pwm_clk, val; in pwm_imx27_get_state() local 148 prescaler = MX3_PWMCR_PRESCALER_GET(val); in pwm_imx27_get_state() 150 pwm_clk = DIV_ROUND_CLOSEST_ULL(pwm_clk, prescaler); in pwm_imx27_get_state()
|
/Linux-v5.4/drivers/clocksource/ |
D | timer-stm32.c | 209 int prescaler = 1; in stm32_timer_set_prescaler() local 212 prescaler = DIV_ROUND_CLOSEST(timer_of_rate(to), in stm32_timer_set_prescaler() 219 prescaler = prescaler < TIM_PSC_MAX ? prescaler : TIM_PSC_MAX; in stm32_timer_set_prescaler() 222 writel_relaxed(prescaler - 1, timer_of_base(to) + TIM_PSC); in stm32_timer_set_prescaler() 227 to->of_clk.rate = DIV_ROUND_CLOSEST(to->of_clk.rate, prescaler); in stm32_timer_set_prescaler()
|
D | timer-ti-dm.c | 638 int prescaler) in omap_dm_timer_set_prescaler() argument 642 if (unlikely(!timer) || prescaler < -1 || prescaler > 7) in omap_dm_timer_set_prescaler() 648 if (prescaler >= 0) { in omap_dm_timer_set_prescaler() 650 l |= prescaler << 2; in omap_dm_timer_set_prescaler()
|
/Linux-v5.4/drivers/watchdog/ |
D | mpc8xxx_wdt.c | 44 int prescaler; member 186 ddata->swtc = min(ddata->wdd.timeout * freq / wdt_type->prescaler, in mpc8xxx_wdt_probe() 197 ddata->wdd.max_hw_heartbeat_ms = (ddata->swtc * wdt_type->prescaler) / in mpc8xxx_wdt_probe() 219 .prescaler = 0x10000, 226 .prescaler = 0x10000, 234 .prescaler = 0x800,
|
D | cadence_wdt.c | 78 u32 prescaler; member 186 count = (wdd->timeout * (clock_f / wdt->prescaler)) / in cdns_wdt_start() 354 wdt->prescaler = CDNS_WDT_PRESCALE_512; in cdns_wdt_probe() 357 wdt->prescaler = CDNS_WDT_PRESCALE_4096; in cdns_wdt_probe()
|
D | kempld_wdt.c | 135 u32 prescaler; in kempld_wdt_set_stage_timeout() local 141 prescaler = kempld_prescaler[PRESCALER_21]; in kempld_wdt_set_stage_timeout() 147 remainder = do_div(stage_timeout64, prescaler); in kempld_wdt_set_stage_timeout() 177 u32 prescaler; in kempld_wdt_get_timeout() local 186 prescaler = kempld_prescaler[STAGE_CFG_GET_PRESCALER(stage_cfg)]; in kempld_wdt_get_timeout() 188 stage_timeout = (stage_timeout & stage->mask) * prescaler; in kempld_wdt_get_timeout()
|
/Linux-v5.4/arch/powerpc/sysdev/ |
D | fsl_gtm.c | 170 unsigned int prescaler; in gtm_set_ref_timer16() local 181 prescaler = gtm->clock / frequency; in gtm_set_ref_timer16() 187 if (prescaler > max_prescaler) in gtm_set_ref_timer16() 190 if (prescaler > max_prescaler / 16) { in gtm_set_ref_timer16() 192 prescaler /= 16; in gtm_set_ref_timer16() 195 if (prescaler <= 256) { in gtm_set_ref_timer16() 197 sps = prescaler - 1; in gtm_set_ref_timer16() 200 sps = prescaler / 256 - 1; in gtm_set_ref_timer16()
|
/Linux-v5.4/Documentation/ABI/testing/ |
D | sysfs-bus-counter-ftm-quaddec | 9 What: /sys/bus/counter/devices/counterX/countY/prescaler 13 Configure the prescaler value associated with Count Y. 15 prescaler (i.e. a counter). This acts like a clock
|
/Linux-v5.4/Documentation/devicetree/bindings/power/supply/ |
D | ltc2941.txt | 16 - lltc,prescaler-exponent: The prescaler exponent as explained in the datasheet. 27 lltc,prescaler-exponent = <5>; /* 2^(2*5) = 1024 */
|
/Linux-v5.4/arch/powerpc/kernel/ |
D | udbg_16550.c | 126 unsigned int dll, dlm, divisor, prescaler, speed; in udbg_probe_uart_speed() local 141 prescaler = 4; in udbg_probe_uart_speed() 143 prescaler = 1; in udbg_probe_uart_speed() 149 speed = (clock / prescaler) / (divisor * 16); in udbg_probe_uart_speed()
|
/Linux-v5.4/drivers/i2c/busses/ |
D | i2c-mpc.c | 360 u32 prescaler = 1; in mpc_i2c_get_prescaler_8xxx() local 375 prescaler = 1; in mpc_i2c_get_prescaler_8xxx() 379 prescaler = mpc_i2c_get_sec_cfg_8xxx() ? 3 : 2; in mpc_i2c_get_prescaler_8xxx() 382 prescaler = 2; in mpc_i2c_get_prescaler_8xxx() 385 return prescaler; in mpc_i2c_get_prescaler_8xxx() 392 u32 prescaler = mpc_i2c_get_prescaler_8xxx(); in mpc_i2c_get_fdr_8xxx() local 398 *real_clk = fsl_get_sys_freq() / prescaler / (16 * 3072); in mpc_i2c_get_fdr_8xxx() 402 divider = fsl_get_sys_freq() / clock / prescaler; in mpc_i2c_get_fdr_8xxx() 417 *real_clk = fsl_get_sys_freq() / prescaler / div->divider; in mpc_i2c_get_fdr_8xxx()
|
/Linux-v5.4/Documentation/devicetree/bindings/mfd/ |
D | stm32-timers.txt | 5 prescaler, break input feature, PWM outputs and complementary PWM ouputs channels. 7 programmable prescaler and PWM outputs. 8 - basic timers consist of a 16-bit auto-reload counter driven by a programmable prescaler.
|
/Linux-v5.4/arch/arm/mach-omap2/ |
D | vc.c | 432 u32 prescaler; in omap4_calc_volt_ramp() local 441 prescaler = 0; in omap4_calc_volt_ramp() 448 prescaler++; in omap4_calc_volt_ramp() 454 prescaler++; in omap4_calc_volt_ramp() 460 prescaler++; in omap4_calc_volt_ramp() 472 return (prescaler << OMAP4430_RAMP_UP_PRESCAL_SHIFT) | in omap4_calc_volt_ramp()
|
/Linux-v5.4/drivers/thermal/st/ |
D | stm_thermal.c | 192 u32 prescaler; in stm_thermal_calibration() local 199 prescaler = 0; in stm_thermal_calibration() 202 while (prescaler <= clk_freq) in stm_thermal_calibration() 203 prescaler++; in stm_thermal_calibration() 212 value |= (prescaler << HSREF_CLK_DIV_POS); in stm_thermal_calibration()
|
/Linux-v5.4/drivers/iio/frequency/ |
D | adf4350.c | 133 u32 div_gcd, prescaler, chspc; in adf4350_set_freq() local 141 prescaler = ADF4350_REG1_PRESCALER; in adf4350_set_freq() 144 prescaler = 0; in adf4350_set_freq() 198 1 << st->r4_rf_div_sel, prescaler ? "8/9" : "4/5", in adf4350_set_freq() 206 prescaler; in adf4350_set_freq()
|
/Linux-v5.4/drivers/mmc/host/ |
D | mxcmmc.c | 793 int prescaler = 0; in mxcmci_set_clk_rate() local 796 while (prescaler <= 0x800) { in mxcmci_set_clk_rate() 802 if (prescaler) in mxcmci_set_clk_rate() 803 x /= (prescaler * 2); in mxcmci_set_clk_rate() 811 if (prescaler == 0) in mxcmci_set_clk_rate() 812 prescaler = 1; in mxcmci_set_clk_rate() 814 prescaler <<= 1; in mxcmci_set_clk_rate() 817 mxcmci_writew(host, (prescaler << 4) | divider, MMC_REG_CLK_RATE); in mxcmci_set_clk_rate() 820 prescaler, divider, clk_in, clk_ios); in mxcmci_set_clk_rate()
|
D | s3cmci.h | 31 u8 prescaler; member
|
/Linux-v5.4/drivers/usb/serial/ |
D | keyspan.c | 69 u8 *prescaler, int portnum); 73 u8 *prescaler, int portnum); 77 u8 *prescaler, int portnum); 81 u8 *prescaler, int portnum); 196 u8 *rate_hi, u8 *rate_low, u8 *prescaler, 1857 u8 *rate_low, u8 *prescaler, int portnum) in keyspan_usa19_calc_baud() argument 1898 u8 *rate_low, u8 *prescaler, int portnum) in keyspan_usa19hs_calc_baud() argument 1934 u8 *rate_low, u8 *prescaler, int portnum) in keyspan_usa19w_calc_baud() argument 1988 if (prescaler) { in keyspan_usa19w_calc_baud() 1989 *prescaler = best_prescaler; in keyspan_usa19w_calc_baud() [all …]
|
D | keyspan_usa26msg.h | 155 prescaler; // BOTH: specified as N/8; values 8-ff are valid member
|
/Linux-v5.4/drivers/iio/trigger/ |
D | stm32-timer-trigger.c | 108 int prescaler = 0; in stm32_timer_start() local 123 prescaler++; in stm32_timer_start() 125 do_div(div, (prescaler + 1)); in stm32_timer_start() 129 if (prescaler > MAX_TIM_PSC) { in stm32_timer_start() 143 regmap_write(priv->regmap, TIM_PSC, prescaler); in stm32_timer_start()
|