Lines Matching full:prescale
23 * 2) Changes to prescale, duty, period, and polarity do not take effect until
105 unsigned long prescale = PRESCALE_MIN, pc, dc; in kona_pwmc_config() local
109 * Find period count, duty count and prescale to suit duty_ns and in kona_pwmc_config()
112 * period_ns = 10^9 * (PRESCALE + 1) * PC / PWM_CLK_RATE in kona_pwmc_config()
113 * duty_ns = 10^9 * (PRESCALE + 1) * DC / PWM_CLK_RATE in kona_pwmc_config()
115 * PC = (PWM_CLK_RATE * period_ns) / (10^9 * (PRESCALE + 1)) in kona_pwmc_config()
116 * DC = (PWM_CLK_RATE * duty_ns) / (10^9 * (PRESCALE + 1)) in kona_pwmc_config()
123 div *= 1 + prescale; in kona_pwmc_config()
135 /* Otherwise, increase prescale and recalculate pc and dc */ in kona_pwmc_config()
136 if (++prescale > PRESCALE_MAX) in kona_pwmc_config()
144 value |= prescale << PRESCALE_SHIFT(chan); in kona_pwmc_config()
214 /* Set prescale to 0 for this channel */ in kona_pwmc_disable()