Lines Matching full:pres
183 unsigned long *cprd, u32 *pres) in atmel_pwm_calculate_cprd_and_pres() argument
196 * clock frequency by two using pres and shift cprd accordingly. in atmel_pwm_calculate_cprd_and_pres()
201 dev_err(pwmchip_parent(chip), "pres exceeds the maximum value\n"); in atmel_pwm_calculate_cprd_and_pres()
204 *pres = shift; in atmel_pwm_calculate_cprd_and_pres()
205 cycles >>= *pres; in atmel_pwm_calculate_cprd_and_pres()
207 *pres = 0; in atmel_pwm_calculate_cprd_and_pres()
217 u32 pres, unsigned long *cdty) in atmel_pwm_calculate_cdty() argument
223 cycles >>= pres; in atmel_pwm_calculate_cdty()
286 u32 pres, val; in atmel_pwm_apply() local
299 pres = cmr & PWM_CMR_CPRE_MSK; in atmel_pwm_apply()
301 atmel_pwm_calculate_cdty(state, clkrate, cprd, pres, &cdty); in atmel_pwm_apply()
307 &pres); in atmel_pwm_apply()
314 atmel_pwm_calculate_cdty(state, clkrate, cprd, pres, &cdty); in atmel_pwm_apply()
328 val = (val & ~PWM_CMR_CPRE_MSK) | (pres & PWM_CMR_CPRE_MSK); in atmel_pwm_apply()
354 u32 cdty, cprd, pres; in atmel_pwm_get_state() local
357 pres = cmr & PWM_CMR_CPRE_MSK; in atmel_pwm_get_state()
362 tmp <<= pres; in atmel_pwm_get_state()
371 tmp <<= pres; in atmel_pwm_get_state()