Lines Matching full:period
15 * running period is completed. This way the hardware switches atomically
17 * - Disabling the hardware completes the currently running period and keeps
49 u32 period, duty_cycle, pwmc0; in visconti_pwm_apply() local
57 * The biggest period the hardware can provide is in visconti_pwm_apply()
62 if (state->period > (0xffff << 3) * 1000) in visconti_pwm_apply()
63 period = (0xffff << 3) * 1000; in visconti_pwm_apply()
65 period = state->period; in visconti_pwm_apply()
67 if (state->duty_cycle > period) in visconti_pwm_apply()
68 duty_cycle = period; in visconti_pwm_apply()
77 period /= 1000; in visconti_pwm_apply()
80 if (!period) in visconti_pwm_apply()
86 * the smallest possible one. As period is at most 0xffff << 3, pwmc0 is in visconti_pwm_apply()
89 pwmc0 = fls(period >> 16); in visconti_pwm_apply()
93 period >>= pwmc0; in visconti_pwm_apply()
100 writel(period, priv->base + PIPGM_PCSR(pwm->hwpwm)); in visconti_pwm_apply()
109 u32 period, duty, pwmc0, pwmc0_clk; in visconti_pwm_get_state() local
111 period = readl(priv->base + PIPGM_PCSR(pwm->hwpwm)); in visconti_pwm_get_state()
116 state->period = (period << pwmc0_clk) * NSEC_PER_USEC; in visconti_pwm_get_state()