Home
last modified time | relevance | path

Searched refs:clock_unit (Results 1 – 1 of 1) sorted by relevance

/Linux-v5.4/drivers/pwm/
Dpwm-imx-tpm.c95 u32 rate, prescale, period_count, clock_unit; in pwm_imx_tpm_round_state() local
100 clock_unit = DIV_ROUND_CLOSEST_ULL(tmp, NSEC_PER_SEC); in pwm_imx_tpm_round_state()
101 if (clock_unit <= PWM_IMX_TPM_MOD_MOD) in pwm_imx_tpm_round_state()
104 prescale = ilog2(clock_unit) + 1 - PWM_IMX_TPM_MOD_WIDTH; in pwm_imx_tpm_round_state()
110 period_count = (clock_unit + ((1 << prescale) >> 1)) >> prescale; in pwm_imx_tpm_round_state()