Home
last modified time | relevance | path

Searched refs:period (Results 1 – 25 of 78) sorted by relevance

1234

/linux-4.19.296/lib/
Dflex_proportions.c42 p->period = 0; in fprop_global_init()
83 p->period += periods; in fprop_new_period()
97 pl->period = 0; in fprop_local_init_single()
109 unsigned int period = p->period; in fprop_reflect_period_single() local
113 if (pl->period == period) in fprop_reflect_period_single()
117 if (pl->period >= period) { in fprop_reflect_period_single()
122 if (period - pl->period < BITS_PER_LONG) in fprop_reflect_period_single()
123 pl->events >>= period - pl->period; in fprop_reflect_period_single()
126 pl->period = period; in fprop_reflect_period_single()
179 pl->period = 0; in fprop_local_init_percpu()
[all …]
/linux-4.19.296/drivers/char/hw_random/
Dtimeriomem-rng.c38 ktime_t period; member
53 int period_us = ktime_to_us(priv->period); in timeriomem_rng_read()
89 hrtimer_forward_now(&priv->timer, priv->period); in timeriomem_rng_read()
112 int period; in timeriomem_rng_probe() local
142 period = i; in timeriomem_rng_probe()
154 period = pdata->period; in timeriomem_rng_probe()
158 priv->period = ns_to_ktime(period * NSEC_PER_USEC); in timeriomem_rng_probe()
182 priv->io_base, period); in timeriomem_rng_probe()
/linux-4.19.296/include/linux/
Dpwm.h42 unsigned int period; member
59 unsigned int period; member
108 static inline void pwm_set_period(struct pwm_device *pwm, unsigned int period) in pwm_set_period() argument
111 pwm->state.period = period; in pwm_set_period()
120 return state.period; in pwm_get_period()
181 state->period = args.period; in pwm_init_state()
202 if (!state->period) in pwm_get_relative_duty_cycle()
206 state->period); in pwm_get_relative_duty_cycle()
235 state->period, in pwm_set_relative_duty_cycle()
312 unsigned int period; member
[all …]
Dflex_proportions.h32 unsigned int period; member
48 unsigned int period; member
80 unsigned int period; member
/linux-4.19.296/drivers/pwm/
Dpwm-renesas-tpu.c85 u16 period; member
188 tpu_pwm_write(pwm, TPU_TGRBn, pwm->period); in tpu_pwm_timer_start()
191 pwm->channel, pwm->duty, pwm->period); in tpu_pwm_timer_start()
234 pwm->period = 0; in tpu_pwm_request()
261 u32 period; in tpu_pwm_config() local
272 period = clk_rate / prescalers[prescaler] in tpu_pwm_config()
274 if (period <= 0xffff) in tpu_pwm_config()
278 if (prescaler == ARRAY_SIZE(prescalers) || period == 0) { in tpu_pwm_config()
286 if (duty > period) in tpu_pwm_config()
294 clk_rate, prescalers[prescaler], period, duty); in tpu_pwm_config()
[all …]
Dpwm-jz4740.c91 unsigned long period, duty; in jz4740_pwm_config() local
98 period = tmp; in jz4740_pwm_config()
100 while (period > 0xffff && prescaler < 6) { in jz4740_pwm_config()
101 period >>= 2; in jz4740_pwm_config()
108 tmp = (unsigned long long)period * duty_ns; in jz4740_pwm_config()
110 duty = period - tmp; in jz4740_pwm_config()
112 if (duty >= period) in jz4740_pwm_config()
113 duty = period - 1; in jz4740_pwm_config()
121 jz4740_timer_set_period(pwm->hwpwm, period); in jz4740_pwm_config()
Dpwm-rockchip.c45 unsigned long period; member
80 tmp = readl_relaxed(pc->base + pc->data->regs.period); in rockchip_pwm_get_state()
82 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in rockchip_pwm_get_state()
108 unsigned long period, duty; in rockchip_pwm_config() local
119 div = clk_rate * state->period; in rockchip_pwm_config()
120 period = DIV_ROUND_CLOSEST_ULL(div, in rockchip_pwm_config()
136 writel(period, pc->base + pc->data->regs.period); in rockchip_pwm_config()
239 .period = 0x08,
252 .period = 0x04,
266 .period = 0x04,
[all …]
Dcore.c155 pwm->args.period = args->args[1]; in of_pwm_xlate_with_flags()
185 pwm->args.period = args->args[1]; in of_pwm_simple_xlate()
471 if (!pwm || !state || !state->period || in pwm_apply_state()
472 state->duty_cycle > state->period) in pwm_apply_state()
510 if (state->period != pwm->state.period || in pwm_apply_state()
514 state->period); in pwm_apply_state()
519 pwm->state.period = state->period; in pwm_apply_state()
590 if (!state.period) { in pwm_adjust_config()
592 state.period = pargs.period; in pwm_adjust_config()
602 if (pargs.period != state.period) { in pwm_adjust_config()
[all …]
Dpwm-sun4i.c145 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state()
166 div = clk_rate * state->period + NSEC_PER_SEC / 2; in sun4i_pwm_calculate()
180 div = div * state->period; in sun4i_pwm_calculate()
192 do_div(div, state->period); in sun4i_pwm_calculate()
197 state->period = DIV_ROUND_CLOSEST_ULL(div, clk_rate); in sun4i_pwm_calculate()
228 if ((cstate.period != state->period) || in sun4i_pwm_apply()
230 u32 period, duty, val; in sun4i_pwm_apply() local
234 &duty, &period, &prescaler); in sun4i_pwm_apply()
252 val = (duty & PWM_DTY_MASK) | PWM_PRD(period); in sun4i_pwm_apply()
255 usecs_to_jiffies(cstate.period / 1000 + 1); in sun4i_pwm_apply()
Dpwm-atmel-tcb.c37 unsigned period; /* PWM period expressed in clk cycles */ member
97 tcbpwm->period = 0; in atmel_tcb_pwm_request()
115 tcbpwm->period = __raw_readl(regs + ATMEL_TC_REG(group, RC)); in atmel_tcb_pwm_request()
250 if (tcbpwm->duty != tcbpwm->period && tcbpwm->duty > 0) { in atmel_tcb_pwm_enable()
273 __raw_writel(tcbpwm->period, regs + ATMEL_TC_REG(group, RC)); in atmel_tcb_pwm_enable()
294 unsigned period; in atmel_tcb_pwm_config() local
331 period = div_u64(period_ns, min); in atmel_tcb_pwm_config()
351 atcbpwm->duty != atcbpwm->period) && in atmel_tcb_pwm_config()
352 (atcbpwm->div != i || atcbpwm->period != period)) { in atmel_tcb_pwm_config()
358 tcbpwm->period = period; in atmel_tcb_pwm_config()
Dpwm-meson.c167 unsigned int duty, unsigned int period) in meson_pwm_calc() argument
174 duty = period - duty; in meson_pwm_calc()
176 if (period == channel->state.period && in meson_pwm_calc()
192 cnt = DIV_ROUND_CLOSEST_ULL((u64)period * 1000, in meson_pwm_calc()
205 dev_dbg(meson->chip.dev, "period=%u pre_div=%u cnt=%u\n", period, in meson_pwm_calc()
208 if (duty == period) { in meson_pwm_calc()
325 if (state->period != channel->state.period || in meson_pwm_apply()
336 state->duty_cycle, state->period); in meson_pwm_apply()
341 channel->state.period = state->period; in meson_pwm_apply()
Dpwm-hibvt.c100 u32 freq, period, duty; in hibvt_pwm_config() local
104 period = div_u64(freq * period_ns, 1000); in hibvt_pwm_config()
105 duty = div_u64(period * duty_cycle_ns, period_ns); in hibvt_pwm_config()
108 PWM_PERIOD_MASK, period); in hibvt_pwm_config()
139 state->period = div_u64(value * 1000, freq); in hibvt_pwm_get_state()
154 if (state->period != pwm->state.period || in hibvt_pwm_apply()
156 hibvt_pwm_config(chip, pwm, state->duty_cycle, state->period); in hibvt_pwm_apply()
Dpwm-bcm-iproc.c102 state->period = 0; in iproc_pwmc_get_state()
115 state->period = div64_u64(tmp, rate); in iproc_pwmc_get_state()
127 u32 value, period, duty; in iproc_pwmc_apply() local
146 value = rate * state->period; in iproc_pwmc_apply()
147 period = div64_u64(value, div); in iproc_pwmc_apply()
151 if (period < IPROC_PWM_PERIOD_MIN || in iproc_pwmc_apply()
155 if (period <= IPROC_PWM_PERIOD_MAX && in iproc_pwmc_apply()
173 writel(period, ip->base + IPROC_PWM_PERIOD_OFFSET(pwm->hwpwm)); in iproc_pwmc_apply()
Dpwm-atmel.c62 u8 period; member
118 unsigned long long cycles = state->period; in atmel_pwm_calculate_cprd_and_pres()
143 do_div(cycles, state->period); in atmel_pwm_calculate_cdty()
173 atmel_pwm->regs->period, cprd); in atmel_pwm_set_cprd_cdty()
226 cstate.period == state->period) { in atmel_pwm_apply()
228 atmel_pwm->regs->period); in atmel_pwm_apply()
281 .period = PWMV1_CPRD,
288 .period = PWMV2_CPRD,
Dpwm-mtk-disp.c81 u32 clk_div, period, high_width, value; in mtk_disp_pwm_config() local
118 period = div64_u64(rate * period_ns, div); in mtk_disp_pwm_config()
119 if (period > 0) in mtk_disp_pwm_config()
120 period--; in mtk_disp_pwm_config()
123 value = period | (high_width << PWM_HIGH_WIDTH_SHIFT); in mtk_disp_pwm_config()
Dpwm-stm32-lp.c59 div = (unsigned long long)clk_get_rate(priv->clk) * state->period; in stm32_pwm_lp_apply()
63 dev_dbg(priv->chip.dev, "Can't reach %u ns\n", state->period); in stm32_pwm_lp_apply()
80 do_div(dty, state->period); in stm32_pwm_lp_apply()
181 state->period = DIV_ROUND_CLOSEST_ULL(tmp, rate); in stm32_pwm_lp_get_state()
/linux-4.19.296/drivers/clk/
Dclk-pwm.c75 if (!pargs.period) { in clk_pwm_probe()
81 clk_pwm->fixed_rate = NSEC_PER_SEC / pargs.period; in clk_pwm_probe()
83 if (pargs.period != NSEC_PER_SEC / clk_pwm->fixed_rate && in clk_pwm_probe()
84 pargs.period != DIV_ROUND_UP(NSEC_PER_SEC, clk_pwm->fixed_rate)) { in clk_pwm_probe()
95 ret = pwm_config(pwm, (pargs.period + 1) >> 1, pargs.period); in clk_pwm_probe()
/linux-4.19.296/drivers/oprofile/
Dnmi_timer_int.c119 u64 period; in nmi_timer_setup() local
122 period = (u64)cpu_khz * 1000; in nmi_timer_setup()
123 do_div(period, HZ); in nmi_timer_setup()
124 nmi_timer_attr.sample_period = period; in nmi_timer_setup()
/linux-4.19.296/drivers/iio/trigger/
Diio-trig-hrtimer.c30 ktime_t period; member
66 info->period = NSEC_PER_SEC / val; in iio_hrtimer_store_sampling_frequency()
95 hrtimer_forward_now(timer, info->period); in iio_hrtimer_trig_handler()
108 hrtimer_start(&trig_info->timer, trig_info->period, in iio_trig_hrtimer_set_state()
143 trig_info->period = NSEC_PER_SEC / trig_info->sampling_frequency; in iio_trig_hrtimer_probe()
/linux-4.19.296/drivers/media/rc/
Dpwm-ir-tx.c64 int i, duty, period; in pwm_ir_tx() local
68 period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, pwm_ir->carrier); in pwm_ir_tx()
69 duty = DIV_ROUND_CLOSEST(pwm_ir->duty_cycle * period, 100); in pwm_ir_tx()
71 pwm_config(pwm, duty, period); in pwm_ir_tx()
Dene_ir.c332 int period = ene_read_reg(dev, ENE_CIRCAR_PRD); in ene_rx_sense_carrier() local
335 if (!(period & ENE_CIRCAR_PRD_VALID)) in ene_rx_sense_carrier()
338 period &= ~ENE_CIRCAR_PRD_VALID; in ene_rx_sense_carrier()
340 if (!period) in ene_rx_sense_carrier()
343 dbg("RX: hardware carrier period = %02x", period); in ene_rx_sense_carrier()
346 carrier = 2000000 / period; in ene_rx_sense_carrier()
347 duty_cycle = (hperiod * 100) / period; in ene_rx_sense_carrier()
890 u32 period; in ene_set_tx_carrier() local
896 period = 2000000 / carrier; in ene_set_tx_carrier()
897 if (period && (period > ENE_CIRMOD_PRD_MAX || in ene_set_tx_carrier()
[all …]
/linux-4.19.296/drivers/misc/
Dioc4.c148 uint64_t start, end, period; in ioc4_clock_calibrate() local
195 period = (end - start) / in ioc4_clock_calibrate()
199 if (period > IOC4_CALIBRATE_LOW_LIMIT || in ioc4_clock_calibrate()
200 period < IOC4_CALIBRATE_HIGH_LIMIT) { in ioc4_clock_calibrate()
206 period = IOC4_CALIBRATE_DEFAULT; in ioc4_clock_calibrate()
208 u64 ns = period; in ioc4_clock_calibrate()
221 idd->count_period = period; in ioc4_clock_calibrate()
/linux-4.19.296/include/trace/events/
Drtc.h168 __field(ktime_t, period)
174 __entry->period = timer->period;
178 __entry->timer, __entry->expires, __entry->period
/linux-4.19.296/include/scsi/
Dscsi_transport_spi.h32 int period; /* value in the PPR/SDTR command */ member
75 #define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period)
157 int spi_populate_sync_msg(unsigned char *msg, int period, int offset);
158 int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width,
/linux-4.19.296/drivers/rtc/
Dinterface.c484 rtc->aie_timer.period = 0; in rtc_set_alarm()
513 rtc->aie_timer.period = 0; in rtc_initialize_alarm()
586 rtc->uie_rtctimer.period = ktime_set(1, 0); in rtc_update_irq_enable()
669 ktime_t period; in rtc_pie_update_irq() local
673 period = NSEC_PER_SEC / rtc->irq_freq; in rtc_pie_update_irq()
674 count = hrtimer_forward_now(timer, period); in rtc_pie_update_irq()
751 ktime_t period = NSEC_PER_SEC / rtc->irq_freq; in rtc_update_hrtimer() local
753 hrtimer_start(&rtc->pie_timer, period, HRTIMER_MODE_REL); in rtc_update_hrtimer()
939 if (ktime_to_ns(timer->period)) { in rtc_timer_do_work()
941 timer->period); in rtc_timer_do_work()
[all …]

1234