Searched refs:on_cycles (Results 1 – 1 of 1) sorted by relevance
55 u64 on_cycles, off_cycles; in apple_pwm_apply() local57 on_cycles = mul_u64_u64_div_u64(fpwm->clkrate, in apple_pwm_apply()59 if (on_cycles > 0xFFFFFFFF) in apple_pwm_apply()60 on_cycles = 0xFFFFFFFF; in apple_pwm_apply()63 state->period, NSEC_PER_SEC) - on_cycles; in apple_pwm_apply()67 writel(on_cycles, fpwm->base + APPLE_PWM_ON_CYCLES); in apple_pwm_apply()81 u32 on_cycles, off_cycles, ctrl; in apple_pwm_get_state() local86 on_cycles = readl(fpwm->base + APPLE_PWM_ON_CYCLES); in apple_pwm_get_state()92 state->duty_cycle = DIV64_U64_ROUND_UP((u64)on_cycles * NSEC_PER_SEC, fpwm->clkrate); in apple_pwm_get_state()93 state->period = DIV64_U64_ROUND_UP(((u64)off_cycles + (u64)on_cycles) * in apple_pwm_get_state()