Home
last modified time | relevance | path

Searched refs:prescaler (Results 1 – 14 of 14) sorted by relevance

/linux-4.19.296/drivers/pwm/
Dpwm-sun4i.c113 unsigned int prescaler; in sun4i_pwm_get_state() local
121 prescaler = 1; in sun4i_pwm_get_state()
123 prescaler = prescaler_table[PWM_REG_PRESCAL(val, pwm->hwpwm)]; in sun4i_pwm_get_state()
125 if (prescaler == 0) in sun4i_pwm_get_state()
141 tmp = prescaler * NSEC_PER_SEC * PWM_REG_DTY(val); in sun4i_pwm_get_state()
144 tmp = prescaler * NSEC_PER_SEC * PWM_REG_PRD(val); in sun4i_pwm_get_state()
153 unsigned int pval, prescaler = 0; in sun4i_pwm_calculate() local
159 prescaler = PWM_PRESCAL_MASK; in sun4i_pwm_calculate()
169 prescaler = 0; in sun4i_pwm_calculate()
172 if (prescaler == 0) { in sun4i_pwm_calculate()
[all …]
Dpwm-renesas-tpu.c84 unsigned int prescaler; member
184 pwm->prescaler); in tpu_pwm_timer_start()
233 pwm->prescaler = 0; in tpu_pwm_request()
258 unsigned int prescaler; in tpu_pwm_config() local
271 for (prescaler = 0; prescaler < ARRAY_SIZE(prescalers); ++prescaler) { in tpu_pwm_config()
272 period = clk_rate / prescalers[prescaler] in tpu_pwm_config()
278 if (prescaler == ARRAY_SIZE(prescalers) || period == 0) { in tpu_pwm_config()
284 duty = clk_rate / prescalers[prescaler] in tpu_pwm_config()
294 clk_rate, prescalers[prescaler], period, duty); in tpu_pwm_config()
296 if (pwm->prescaler == prescaler && pwm->period == period) in tpu_pwm_config()
[all …]
Dpwm-rockchip.c52 unsigned int prescaler; member
81 tmp *= pc->data->prescaler * NSEC_PER_SEC; in rockchip_pwm_get_state()
85 tmp *= pc->data->prescaler * NSEC_PER_SEC; in rockchip_pwm_get_state()
121 pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config()
124 duty = DIV_ROUND_CLOSEST_ULL(div, pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config()
243 .prescaler = 2,
256 .prescaler = 1,
270 .prescaler = 1,
284 .prescaler = 1,
Dpwm-jz4740.c92 unsigned int prescaler = 0; in jz4740_pwm_config() local
100 while (period > 0xffff && prescaler < 6) { in jz4740_pwm_config()
102 ++prescaler; in jz4740_pwm_config()
105 if (prescaler == 6) in jz4740_pwm_config()
123 ctrl = JZ_TIMER_CTRL_PRESCALER(prescaler) | JZ_TIMER_CTRL_SRC_EXT | in jz4740_pwm_config()
Dpwm-stm32.c323 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()
/linux-4.19.296/drivers/i2c/busses/
Di2c-mpc.c439 u32 prescaler = 1; in mpc_i2c_get_prescaler_8xxx() local
454 prescaler = 1; in mpc_i2c_get_prescaler_8xxx()
458 prescaler = mpc_i2c_get_sec_cfg_8xxx() ? 3 : 2; in mpc_i2c_get_prescaler_8xxx()
461 prescaler = 2; in mpc_i2c_get_prescaler_8xxx()
464 return prescaler; in mpc_i2c_get_prescaler_8xxx()
471 u32 prescaler = mpc_i2c_get_prescaler_8xxx(); in mpc_i2c_get_fdr_8xxx() local
477 *real_clk = fsl_get_sys_freq() / prescaler / (16 * 3072); in mpc_i2c_get_fdr_8xxx()
481 divider = fsl_get_sys_freq() / clock / prescaler; in mpc_i2c_get_fdr_8xxx()
496 *real_clk = fsl_get_sys_freq() / prescaler / div->divider; in mpc_i2c_get_fdr_8xxx()
Di2c-stm32f7.c499 u32 prescaler = (v->presc + 1) * i2cclk; in stm32f7_i2c_compute_timing() local
502 u32 tscl_l = (l + 1) * prescaler + tsync; in stm32f7_i2c_compute_timing()
511 u32 tscl_h = (h + 1) * prescaler + tsync; in stm32f7_i2c_compute_timing()
/linux-4.19.296/drivers/iio/frequency/
Dadf4350.c134 u32 div_gcd, prescaler, chspc; in adf4350_set_freq() local
142 prescaler = ADF4350_REG1_PRESCALER; in adf4350_set_freq()
145 prescaler = 0; in adf4350_set_freq()
199 1 << st->r4_rf_div_sel, prescaler ? "8/9" : "4/5", in adf4350_set_freq()
207 prescaler; in adf4350_set_freq()
/linux-4.19.296/include/linux/platform_data/
Dpwm_omap_dmtimer.h82 int (*set_prescaler)(pwm_omap_dmtimer *timer, int prescaler);
Ddmtimer-omap.h50 int (*set_prescaler)(struct omap_dm_timer *timer, int prescaler);
/linux-4.19.296/drivers/iio/trigger/
Dstm32-timer-trigger.c108 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()
/linux-4.19.296/drivers/media/rc/
Dmceusb.c1020 int prescaler = 0, divisor = 0; in mceusb_set_tx_carrier() local
1036 for (prescaler = 0; prescaler < 4; ++prescaler) { in mceusb_set_tx_carrier()
1037 divisor = (clk >> (2 * prescaler)) / carrier; in mceusb_set_tx_carrier()
1040 cmdbuf[2] = prescaler; in mceusb_set_tx_carrier()
/linux-4.19.296/drivers/clk/
Dclk-stm32h7.c437 u32 prescaler; in timer_ker_recalc_rate() local
442 prescaler = (readl(base + RCC_D2CFGR) >> dppre_shift) & 0x03; in timer_ker_recalc_rate()
446 if (prescaler < 4) in timer_ker_recalc_rate()
449 else if (timpre && prescaler > 4) in timer_ker_recalc_rate()
Dclk-stm32mp1.c920 u32 prescaler; in __bestmult() local
923 prescaler = readl_relaxed(tim_ker->apbdiv) & APB_DIV_MASK; in __bestmult()
924 if (prescaler < 2) in __bestmult()
974 u32 prescaler, timpre; in timer_ker_recalc_rate() local
977 prescaler = readl_relaxed(tim_ker->apbdiv) & APB_DIV_MASK; in timer_ker_recalc_rate()
981 if (!prescaler) in timer_ker_recalc_rate()