Searched refs:PWM_SIFIVE_CMPWIDTH (Results 1 – 1 of 1) sorted by relevance
56 #define PWM_SIFIVE_CMPWIDTH 16 macro112 scale = clamp(ilog2(scale_pow) - PWM_SIFIVE_CMPWIDTH, 0, 0xf); in pwm_sifive_update_clock()119 num = (unsigned long long)NSEC_PER_SEC << (PWM_SIFIVE_CMPWIDTH + scale); in pwm_sifive_update_clock()136 duty = (1U << PWM_SIFIVE_CMPWIDTH) - 1 - inactive; in pwm_sifive_get_state()146 (1U << PWM_SIFIVE_CMPWIDTH)); in pwm_sifive_get_state()180 num = (u64)duty_cycle * (1U << PWM_SIFIVE_CMPWIDTH); in pwm_sifive_apply()184 frac = min(frac, (u64)(1U << PWM_SIFIVE_CMPWIDTH) - 1); in pwm_sifive_apply()186 inactive = (1U << PWM_SIFIVE_CMPWIDTH) - 1 - frac; in pwm_sifive_apply()