Lines Matching defs:period
19 * the currently running period.
21 * period to complete first).
85 /* Duty cycle defines LOW period of PWM */
88 /* Duty cycle defines HIGH period of PWM */
121 u64 duty, period;
129 /* period = period_ns * ddata->clk_rate / NSEC_PER_SEC */
130 period = mul_u64_u64_div_u64(period_ns, ddata->clk_rate, NSEC_PER_SEC);
131 if (period > U32_MAX)
132 period = U32_MAX;
135 pwm_loongson_writel(ddata, period, LOONGSON_PWM_REG_PERIOD);
156 ret = pwm_loongson_config(chip, pwm, state->duty_cycle, state->period);
169 u32 duty, period, ctrl;
173 period = pwm_loongson_readl(ddata, LOONGSON_PWM_REG_PERIOD);
176 /* duty & period have a max of 2^32, so we can't overflow */
178 state->period = DIV64_U64_ROUND_UP((u64)period * NSEC_PER_SEC, ddata->clk_rate);