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
50 u32 period, duty_cycle, pwmc0; in visconti_pwm_apply() local
58 * The biggest period the hardware can provide is in visconti_pwm_apply()
63 if (state->period > (0xffff << 3) * 1000) in visconti_pwm_apply()
64 period = (0xffff << 3) * 1000; in visconti_pwm_apply()
66 period = state->period; in visconti_pwm_apply()
68 if (state->duty_cycle > period) in visconti_pwm_apply()
69 duty_cycle = period; in visconti_pwm_apply()
78 period /= 1000; in visconti_pwm_apply()
81 if (!period) in visconti_pwm_apply()
87 * the smallest possible one. As period is at most 0xffff << 3, pwmc0 is in visconti_pwm_apply()
90 pwmc0 = fls(period >> 16); in visconti_pwm_apply()
94 period >>= pwmc0; in visconti_pwm_apply()
101 writel(period, priv->base + PIPGM_PCSR(pwm->hwpwm)); in visconti_pwm_apply()
110 u32 period, duty, pwmc0, pwmc0_clk; in visconti_pwm_get_state() local
112 period = readl(priv->base + PIPGM_PCSR(pwm->hwpwm)); in visconti_pwm_get_state()
117 state->period = (period << pwmc0_clk) * NSEC_PER_USEC; in visconti_pwm_get_state()