Lines Matching refs:prescale
70 u8 prescale; member
93 u32 rate, prescale, period_count, clock_unit; in pwm_imx_tpm_round_state() local
100 prescale = 0; in pwm_imx_tpm_round_state()
102 prescale = ilog2(clock_unit) + 1 - PWM_IMX_TPM_MOD_WIDTH; in pwm_imx_tpm_round_state()
104 if ((!FIELD_FIT(PWM_IMX_TPM_SC_PS, prescale))) in pwm_imx_tpm_round_state()
106 p->prescale = prescale; in pwm_imx_tpm_round_state()
108 period_count = (clock_unit + ((1 << prescale) >> 1)) >> prescale; in pwm_imx_tpm_round_state()
112 tmp = (u64)period_count << prescale; in pwm_imx_tpm_round_state()
140 u32 rate, val, prescale; in pwm_imx_tpm_get_state() local
149 prescale = FIELD_GET(PWM_IMX_TPM_SC_PS, val); in pwm_imx_tpm_get_state()
151 tmp = (tmp << prescale) * NSEC_PER_SEC; in pwm_imx_tpm_get_state()
197 if (cmod && cur_prescale != p->prescale) in pwm_imx_tpm_apply_hw()
202 val |= FIELD_PREP(PWM_IMX_TPM_SC_PS, p->prescale); in pwm_imx_tpm_apply_hw()