Lines Matching refs:period_ns
98 unsigned int period_ns; member
147 static void lpc18xx_pwm_config_period(struct pwm_chip *chip, u64 period_ns) in lpc18xx_pwm_config_period() argument
158 val = mul_u64_u64_div_u64(period_ns, lpc18xx_pwm->clk_rate, NSEC_PER_SEC); in lpc18xx_pwm_config_period()
192 int duty_ns, int period_ns) in lpc18xx_pwm_config() argument
197 if (period_ns < lpc18xx_pwm->min_period_ns || in lpc18xx_pwm_config()
198 period_ns > lpc18xx_pwm->max_period_ns) { in lpc18xx_pwm_config()
199 dev_err(pwmchip_parent(chip), "period %d not in range\n", period_ns); in lpc18xx_pwm_config()
213 if (requested_events > 2 && lpc18xx_pwm->period_ns != period_ns && in lpc18xx_pwm_config()
214 lpc18xx_pwm->period_ns) { in lpc18xx_pwm_config()
221 if ((requested_events <= 2 && lpc18xx_pwm->period_ns != period_ns) || in lpc18xx_pwm_config()
222 !lpc18xx_pwm->period_ns) { in lpc18xx_pwm_config()
223 lpc18xx_pwm->period_ns = period_ns; in lpc18xx_pwm_config()
224 lpc18xx_pwm_config_period(chip, period_ns); in lpc18xx_pwm_config()