Lines Matching defs: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;
57 * The biggest period the hardware can provide is
62 if (state->period > (0xffff << 3) * 1000)
63 period = (0xffff << 3) * 1000;
65 period = state->period;
67 if (state->duty_cycle > period)
68 duty_cycle = period;
77 period /= 1000;
80 if (!period)
86 * the smallest possible one. As period is at most 0xffff << 3, pwmc0 is
89 pwmc0 = fls(period >> 16);
93 period >>= pwmc0;
100 writel(period, priv->base + PIPGM_PCSR(pwm->hwpwm));
109 u32 period, duty, pwmc0, pwmc0_clk;
111 period = readl(priv->base + PIPGM_PCSR(pwm->hwpwm));
116 state->period = (period << pwmc0_clk) * NSEC_PER_USEC;