Home
last modified time | relevance | path

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

/linux/drivers/pwm/
H A Dpwm-apple.c54 u64 on_cycles, off_cycles; in apple_pwm_apply() local
56 on_cycles = mul_u64_u64_div_u64(fpwm->clkrate, in apple_pwm_apply()
58 if (on_cycles > 0xFFFFFFFF) in apple_pwm_apply()
59 on_cycles = 0xFFFFFFFF; in apple_pwm_apply()
62 state->period, NSEC_PER_SEC) - on_cycles; in apple_pwm_apply()
66 writel(on_cycles, fpwm->base + APPLE_PWM_ON_CYCLES); in apple_pwm_apply()
80 u32 on_cycles, off_cycles, ctrl; in apple_pwm_get_state() local
85 on_cycles = readl(fpwm->base + APPLE_PWM_ON_CYCLES); in apple_pwm_get_state()
91 state->duty_cycle = DIV64_U64_ROUND_UP((u64)on_cycles * NSEC_PER_SEC, fpwm->clkrate); in apple_pwm_get_state()
92 state->period = DIV64_U64_ROUND_UP(((u64)off_cycles + (u64)on_cycles) * in apple_pwm_get_state()