Home
last modified time | relevance | path

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

/openbmc/linux/drivers/pwm/
H A Dpwm-imx-tpm.c93 u32 rate, prescale, period_count, clock_unit; in pwm_imx_tpm_round_state() local
98 clock_unit = DIV_ROUND_CLOSEST_ULL(tmp, NSEC_PER_SEC); in pwm_imx_tpm_round_state()
99 if (clock_unit <= PWM_IMX_TPM_MOD_MOD) in pwm_imx_tpm_round_state()
102 prescale = ilog2(clock_unit) + 1 - PWM_IMX_TPM_MOD_WIDTH; in pwm_imx_tpm_round_state()
108 period_count = (clock_unit + ((1 << prescale) >> 1)) >> prescale; in pwm_imx_tpm_round_state()