Lines Matching refs:pre_div
91 u8 pre_div; member
159 unsigned int duty, period, pre_div, cnt, duty_cnt; in meson_pwm_calc() local
176 pre_div = div64_u64(fin_freq * (u64)period, NSEC_PER_SEC * 0xffffLL); in meson_pwm_calc()
177 if (pre_div > MISC_CLK_DIV_MASK) { in meson_pwm_calc()
182 cnt = div64_u64(fin_freq * (u64)period, NSEC_PER_SEC * (pre_div + 1)); in meson_pwm_calc()
189 pre_div, cnt); in meson_pwm_calc()
192 channel->pre_div = pre_div; in meson_pwm_calc()
196 channel->pre_div = pre_div; in meson_pwm_calc()
202 NSEC_PER_SEC * (pre_div + 1)); in meson_pwm_calc()
209 duty, pre_div, duty_cnt); in meson_pwm_calc()
211 channel->pre_div = pre_div; in meson_pwm_calc()
232 value |= channel->pre_div << channel_data->clk_div_shift; in meson_pwm_enable()
282 channel->pre_div = 0; in meson_pwm_apply()
318 return cnt * fin_ns * (channel->pre_div + 1); in meson_pwm_cnt_to_ns()
341 channel->pre_div = FIELD_GET(MISC_CLK_DIV_MASK, tmp); in meson_pwm_get_state()